From 7a8a956e6849a18110278ac7a9d1d0bf30077931 Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Fri, 7 May 2004 23:45:29 +0000 Subject: [PATCH] added 1 pixel horizontal padding around the label. 2004-05-08 Sven Neumann * app/display/gimpstatusbar.c (gimp_statusbar_resize_cursor): added 1 pixel horizontal padding around the label. --- ChangeLog | 5 +++++ app/display/gimpstatusbar.c | 18 +++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 234c88e780..6d0334bc3a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-05-08 Sven Neumann + + * app/display/gimpstatusbar.c (gimp_statusbar_resize_cursor): + added 1 pixel horizontal padding around the label. + 2004-05-08 Sven Neumann * app/display/gimpstatusbar.[ch]: renamed struct member combo to diff --git a/app/display/gimpstatusbar.c b/app/display/gimpstatusbar.c index b8563d3e85..31ff020471 100644 --- a/app/display/gimpstatusbar.c +++ b/app/display/gimpstatusbar.c @@ -302,7 +302,7 @@ gimp_statusbar_resize_cursor (GimpStatusbar *statusbar) GtkTreeModel *model; const gchar *text; gint cursor_label_width; - gint label_frame_size_difference; + gint diff; g_return_if_fail (GIMP_IS_STATUSBAR (statusbar)); @@ -347,20 +347,21 @@ gimp_statusbar_resize_cursor (GimpStatusbar *statusbar) pango_layout_get_pixel_size (layout, &cursor_label_width, NULL); + cursor_label_width += 2; + /* find out how many pixels the label's parent frame is bigger than * the label itself */ - label_frame_size_difference = (statusbar->cursor_frame->allocation.width - - statusbar->cursor_label->allocation.width); + diff = (statusbar->cursor_frame->allocation.width - + statusbar->cursor_label->allocation.width); - gtk_widget_set_size_request (statusbar->cursor_label, cursor_label_width, -1); + gtk_widget_set_size_request (statusbar->cursor_label, + cursor_label_width, -1); /* don't resize if this is a new display */ - if (label_frame_size_difference) + if (diff) gtk_widget_set_size_request (statusbar->cursor_frame, - cursor_label_width + - label_frame_size_difference, - -1); + cursor_label_width + diff, -1); } static void @@ -401,4 +402,3 @@ gimp_statusbar_unit_changed (GtkWidget *combo, gimp_image_set_unit (statusbar->shell->gdisp->gimage, gtk_combo_box_get_active (GTK_COMBO_BOX (combo))); } -