forked from AuroraMiddleware/gtk
Be a bit more careful to not shrink the label to a negative width.
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)
This commit is contained in:
parent
5bf952292b
commit
cd5028315a
@ -1,5 +1,9 @@
|
|||||||
2005-07-21 Matthias Clasen <mclasen@redhat.com>
|
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.
|
* gtk/gtk.symbols: mark gtk_socket_steal as deprecated.
|
||||||
|
|
||||||
* configure.in: Bump the cairo requirement.
|
* configure.in: Bump the cairo requirement.
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
2005-07-21 Matthias Clasen <mclasen@redhat.com>
|
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.
|
* gtk/gtk.symbols: mark gtk_socket_steal as deprecated.
|
||||||
|
|
||||||
* configure.in: Bump the cairo requirement.
|
* configure.in: Bump the cairo requirement.
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
2005-07-21 Matthias Clasen <mclasen@redhat.com>
|
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.
|
* gtk/gtk.symbols: mark gtk_socket_steal as deprecated.
|
||||||
|
|
||||||
* configure.in: Bump the cairo requirement.
|
* configure.in: Bump the cairo requirement.
|
||||||
|
@ -751,8 +751,8 @@ gtk_statusbar_expose_event (GtkWidget *widget,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gtk_statusbar_size_request (GtkWidget *widget,
|
gtk_statusbar_size_request (GtkWidget *widget,
|
||||||
GtkRequisition *requisition)
|
GtkRequisition *requisition)
|
||||||
{
|
{
|
||||||
GtkStatusbar *statusbar;
|
GtkStatusbar *statusbar;
|
||||||
GtkShadowType shadow_type;
|
GtkShadowType shadow_type;
|
||||||
@ -854,9 +854,9 @@ gtk_statusbar_size_allocate (GtkWidget *widget,
|
|||||||
{
|
{
|
||||||
/* shrink the label to make room for the grip */
|
/* shrink the label to make room for the grip */
|
||||||
*allocation = statusbar->label->allocation;
|
*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)
|
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);
|
gtk_widget_size_allocate (statusbar->label, allocation);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user