diff options
author | Matthias Clasen <mclasen@redhat.com> | 2004-11-10 15:32:19 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2004-11-10 15:32:19 +0000 |
commit | 06d507703db1778c6ebae2120b3e6295e60bc7bd (patch) | |
tree | 95c64f25bc1c71b13e87f7ce84b5eca968c61855 /gtk/gtkstatusbar.c | |
parent | 6de551b5041d4a1c8e248d8381772b2264ae6bcf (diff) | |
download | gdk-pixbuf-06d507703db1778c6ebae2120b3e6295e60bc7bd.tar.gz |
Only shorten the label if it actually overlaps the resize grip.
2004-11-10 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkstatusbar.c (gtk_statusbar_size_allocate): Only
shorten the label if it actually overlaps the resize grip.
Diffstat (limited to 'gtk/gtkstatusbar.c')
-rw-r--r-- | gtk/gtkstatusbar.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/gtk/gtkstatusbar.c b/gtk/gtkstatusbar.c index aa41ce2c9..0844335f6 100644 --- a/gtk/gtkstatusbar.c +++ b/gtk/gtkstatusbar.c @@ -776,7 +776,7 @@ gtk_statusbar_size_allocate (GtkWidget *widget, if (statusbar->has_resize_grip && statusbar->grip_window) { - GdkRectangle rect; + GdkRectangle rect, overlap; GtkAllocation allocation; get_grip_rect (statusbar, &rect); @@ -787,11 +787,14 @@ gtk_statusbar_size_allocate (GtkWidget *widget, rect.width, rect.height); allocation = statusbar->label->allocation; - allocation.width -= rect.width; - if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) - allocation.x += rect.width; - - gtk_widget_size_allocate (statusbar->label, &allocation); + if (gdk_rectangle_intersect (&rect, &allocation, &overlap)) + { + allocation.width -= rect.width; + if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) + allocation.x += rect.width; + + gtk_widget_size_allocate (statusbar->label, &allocation); + } } } |