forked from AuroraMiddleware/gtk
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.
This commit is contained in:
parent
6de551b504
commit
06d507703d
@ -1,5 +1,8 @@
|
||||
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.
|
||||
|
||||
* gdk/linux-fb/*: Fix many sparse warnings. (#157253,
|
||||
Kjartan Maraas.
|
||||
|
||||
|
@ -1,5 +1,8 @@
|
||||
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.
|
||||
|
||||
* gdk/linux-fb/*: Fix many sparse warnings. (#157253,
|
||||
Kjartan Maraas.
|
||||
|
||||
|
@ -1,5 +1,8 @@
|
||||
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.
|
||||
|
||||
* gdk/linux-fb/*: Fix many sparse warnings. (#157253,
|
||||
Kjartan Maraas.
|
||||
|
||||
|
@ -1,5 +1,8 @@
|
||||
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.
|
||||
|
||||
* gdk/linux-fb/*: Fix many sparse warnings. (#157253,
|
||||
Kjartan Maraas.
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user