diff options
author | Owen Taylor <otaylor@redhat.com> | 2000-01-26 02:33:04 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2000-01-26 02:33:04 +0000 |
commit | 9770128fb99676a070993a4a1fe0f5593786be6d (patch) | |
tree | bf1990a7281fff384a5c5cf743888b154174a6f3 | |
parent | c1f4231af60e9f4bd7a1aa0e743ec91da346648a (diff) | |
download | gdk-pixbuf-9770128fb99676a070993a4a1fe0f5593786be6d.tar.gz |
Use the requisition, not the allocation, since the allocation has not
Wed Jan 26 21:17:03 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkoptionmenu.c (gtk_option_menu_position):
Use the requisition, not the allocation, since the
allocation has not necessarily been computed yet.
(Pointed out by Eugene Osintsev)
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | ChangeLog.pre-2-0 | 7 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 7 | ||||
-rw-r--r-- | ChangeLog.pre-2-2 | 7 | ||||
-rw-r--r-- | ChangeLog.pre-2-4 | 7 | ||||
-rw-r--r-- | ChangeLog.pre-2-6 | 7 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 7 | ||||
-rw-r--r-- | gtk/gtkoptionmenu.c | 16 |
8 files changed, 61 insertions, 4 deletions
@@ -1,3 +1,10 @@ +Wed Jan 26 21:17:03 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkoptionmenu.c (gtk_option_menu_position): + Use the requisition, not the allocation, since the + allocation has not necessarily been computed yet. + (Pointed out by Eugene Osintsev) + Wed Jan 26 19:44:25 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkstyle.c (gtk_style_new): Dont' set diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 40d5196bf..669bfbd98 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,10 @@ +Wed Jan 26 21:17:03 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkoptionmenu.c (gtk_option_menu_position): + Use the requisition, not the allocation, since the + allocation has not necessarily been computed yet. + (Pointed out by Eugene Osintsev) + Wed Jan 26 19:44:25 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkstyle.c (gtk_style_new): Dont' set diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 40d5196bf..669bfbd98 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,10 @@ +Wed Jan 26 21:17:03 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkoptionmenu.c (gtk_option_menu_position): + Use the requisition, not the allocation, since the + allocation has not necessarily been computed yet. + (Pointed out by Eugene Osintsev) + Wed Jan 26 19:44:25 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkstyle.c (gtk_style_new): Dont' set diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 40d5196bf..669bfbd98 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,10 @@ +Wed Jan 26 21:17:03 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkoptionmenu.c (gtk_option_menu_position): + Use the requisition, not the allocation, since the + allocation has not necessarily been computed yet. + (Pointed out by Eugene Osintsev) + Wed Jan 26 19:44:25 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkstyle.c (gtk_style_new): Dont' set diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 40d5196bf..669bfbd98 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,10 @@ +Wed Jan 26 21:17:03 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkoptionmenu.c (gtk_option_menu_position): + Use the requisition, not the allocation, since the + allocation has not necessarily been computed yet. + (Pointed out by Eugene Osintsev) + Wed Jan 26 19:44:25 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkstyle.c (gtk_style_new): Dont' set diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 40d5196bf..669bfbd98 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,10 @@ +Wed Jan 26 21:17:03 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkoptionmenu.c (gtk_option_menu_position): + Use the requisition, not the allocation, since the + allocation has not necessarily been computed yet. + (Pointed out by Eugene Osintsev) + Wed Jan 26 19:44:25 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkstyle.c (gtk_style_new): Dont' set diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 40d5196bf..669bfbd98 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,10 @@ +Wed Jan 26 21:17:03 2000 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkoptionmenu.c (gtk_option_menu_position): + Use the requisition, not the allocation, since the + allocation has not necessarily been computed yet. + (Pointed out by Eugene Osintsev) + Wed Jan 26 19:44:25 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkstyle.c (gtk_style_new): Dont' set diff --git a/gtk/gtkoptionmenu.c b/gtk/gtkoptionmenu.c index 27d1f347d..27a79b188 100644 --- a/gtk/gtkoptionmenu.c +++ b/gtk/gtkoptionmenu.c @@ -616,6 +616,7 @@ gtk_option_menu_position (GtkMenu *menu, GtkOptionMenu *option_menu; GtkWidget *active; GtkWidget *child; + GtkRequisition requisition; GList *children; gint shift_menu; gint screen_width; @@ -630,8 +631,9 @@ gtk_option_menu_position (GtkMenu *menu, option_menu = GTK_OPTION_MENU (user_data); - width = GTK_WIDGET (menu)->allocation.width; - height = GTK_WIDGET (menu)->allocation.height; + gtk_widget_get_child_requisition (GTK_WIDGET (menu), &requisition); + width = requisition.width; + height = requisition.height; active = gtk_menu_get_active (GTK_MENU (option_menu->menu)); children = GTK_MENU_SHELL (option_menu->menu)->children; @@ -640,7 +642,10 @@ gtk_option_menu_position (GtkMenu *menu, menu_ypos += GTK_WIDGET (option_menu)->allocation.height / 2 - 2; if (active != NULL) - menu_ypos -= active->requisition.height / 2; + { + gtk_widget_get_child_requisition (active, &requisition); + menu_ypos -= requisition.height / 2; + } while (children) { @@ -650,7 +655,10 @@ gtk_option_menu_position (GtkMenu *menu, break; if (GTK_WIDGET_VISIBLE (child)) - menu_ypos -= child->allocation.height; + { + gtk_widget_get_child_requisition (child, &requisition); + menu_ypos -= requisition.height; + } children = children->next; } |