2005-07-21 Matthias Clasen <mclasen@redhat.com>
+ * gtk/gtkstatusbar.c (gtk_statusbar_size_allocate): Be
+ a bit more careful to not shrink the label to a negative
+ width. (#311175, Thomas Vander Stichele)
+
* gtk/gtk.symbols: mark gtk_socket_steal as deprecated.
* configure.in: Bump the cairo requirement.
2005-07-21 Matthias Clasen <mclasen@redhat.com>
+ * gtk/gtkstatusbar.c (gtk_statusbar_size_allocate): Be
+ a bit more careful to not shrink the label to a negative
+ width. (#311175, Thomas Vander Stichele)
+
* gtk/gtk.symbols: mark gtk_socket_steal as deprecated.
* configure.in: Bump the cairo requirement.
2005-07-21 Matthias Clasen <mclasen@redhat.com>
+ * gtk/gtkstatusbar.c (gtk_statusbar_size_allocate): Be
+ a bit more careful to not shrink the label to a negative
+ width. (#311175, Thomas Vander Stichele)
+
* gtk/gtk.symbols: mark gtk_socket_steal as deprecated.
* configure.in: Bump the cairo requirement.
}
static void
-gtk_statusbar_size_request (GtkWidget *widget,
- GtkRequisition *requisition)
+gtk_statusbar_size_request (GtkWidget *widget,
+ GtkRequisition *requisition)
{
GtkStatusbar *statusbar;
GtkShadowType shadow_type;
allocation->x += rect.width;
}
}
-
+
/* chain up normally */
GTK_WIDGET_CLASS (parent_class)->size_allocate (widget, allocation);
{
/* shrink the label to make room for the grip */
*allocation = statusbar->label->allocation;
- allocation->width -= rect.width;
+ allocation->width = MAX (1, allocation->width - rect.width);
if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
- allocation->x += rect.width;
-
+ allocation->x += statusbar->label->allocation.width - allocation->width;
+
gtk_widget_size_allocate (statusbar->label, allocation);
}
}