summaryrefslogtreecommitdiff
path: root/gtk/gtkmenuitem.c
diff options
context:
space:
mode:
authorSoeren Sandmann <sandmann@daimi.au.dk>2002-04-25 18:39:43 +0000
committerSøren Sandmann Pedersen <ssp@src.gnome.org>2002-04-25 18:39:43 +0000
commitc09a9a9fe170fe5f69971663d1f7b69673e878af (patch)
tree8cbdfeab0bc835931381904bde789913fa68a7c1 /gtk/gtkmenuitem.c
parent79ffad4abecd0b73c0a4e30133903c4fe0f4d841 (diff)
downloadgtk+-c09a9a9fe170fe5f69971663d1f7b69673e878af.tar.gz
use the child's requisition.height, not allocation.height, as width of
Thu Apr 25 20:24:37 2002 Soeren Sandmann <sandmann@daimi.au.dk> * gtk/gtkmenuitem.c (gtk_menu_item_size_allocate): use the child's requisition.height, not allocation.height, as width of submenu indicator. (#75948)
Diffstat (limited to 'gtk/gtkmenuitem.c')
-rw-r--r--gtk/gtkmenuitem.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gtk/gtkmenuitem.c b/gtk/gtkmenuitem.c
index 552c0f0498..dfb753169f 100644
--- a/gtk/gtkmenuitem.c
+++ b/gtk/gtkmenuitem.c
@@ -497,6 +497,8 @@ gtk_menu_item_size_allocate (GtkWidget *widget,
if (bin->child)
{
+ GtkRequisition child_requisition;
+
child_allocation.x = (GTK_CONTAINER (widget)->border_width +
widget->style->xthickness +
BORDER_SPACING);
@@ -508,9 +510,10 @@ gtk_menu_item_size_allocate (GtkWidget *widget,
child_allocation.width -= GTK_MENU_ITEM (widget)->toggle_size;
child_allocation.x += widget->allocation.x;
child_allocation.y += widget->allocation.y;
-
+
+ gtk_widget_get_child_requisition (bin->child, &child_requisition);
if (menu_item->submenu && menu_item->show_submenu_indicator)
- child_allocation.width -= child_allocation.height;
+ child_allocation.width -= child_requisition.height;
gtk_widget_size_allocate (bin->child, &child_allocation);
}