]> Pileus Git - ~andy/gtk/commitdiff
Only shrink the label if we need to. (#169390, Felix Riemann)
authorMatthias Clasen <mclasen@redhat.com>
Mon, 16 May 2005 04:54:35 +0000 (04:54 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Mon, 16 May 2005 04:54:35 +0000 (04:54 +0000)
2005-05-16  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtkstatusbar.c (gtk_statusbar_size_allocate): Only shrink
the label if we need to.  (#169390, Felix Riemann)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-8
gtk/gtkstatusbar.c

index fc2c209148623aadaa83b635624379ced3a2844a..ef3a59d05aac39a78fdf442e25cb8d34aee6bcc7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-05-16  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkstatusbar.c (gtk_statusbar_size_allocate): Only shrink
+       the label if we need to.  (#169390, Felix Riemann)
+
 Sat May 14 00:07:46 2005  Manish Singh  <yosh@gimp.org>
 
        * gdk/gdkdraw.c
index fc2c209148623aadaa83b635624379ced3a2844a..ef3a59d05aac39a78fdf442e25cb8d34aee6bcc7 100644 (file)
@@ -1,3 +1,8 @@
+2005-05-16  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkstatusbar.c (gtk_statusbar_size_allocate): Only shrink
+       the label if we need to.  (#169390, Felix Riemann)
+
 Sat May 14 00:07:46 2005  Manish Singh  <yosh@gimp.org>
 
        * gdk/gdkdraw.c
index fc2c209148623aadaa83b635624379ced3a2844a..ef3a59d05aac39a78fdf442e25cb8d34aee6bcc7 100644 (file)
@@ -1,3 +1,8 @@
+2005-05-16  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkstatusbar.c (gtk_statusbar_size_allocate): Only shrink
+       the label if we need to.  (#169390, Felix Riemann)
+
 Sat May 14 00:07:46 2005  Manish Singh  <yosh@gimp.org>
 
        * gdk/gdkdraw.c
index 13beb6ef3b2154301da782c64012e1346993b7ad..1cac81d9ab284b70eaa8b3e73dbc3886d7541b55 100644 (file)
@@ -850,13 +850,16 @@ gtk_statusbar_size_allocate  (GtkWidget     *widget,
        }
       else
        {
-         /* shrink the label to make room for the grip */
-         *allocation = statusbar->label->allocation;
-         allocation->width -= rect.width;
-         if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) 
-           allocation->x += rect.width;
+         if (statusbar->label->allocation.width + rect.width > statusbar->frame->allocation.width)
+           {
+             /* shrink the label to make room for the grip */
+             *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);
+             gtk_widget_size_allocate (statusbar->label, allocation);
+           }
        }
     }
 }