diff options
author | Owen Taylor <owt1@cornell.edu> | 1998-04-06 02:00:48 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 1998-04-06 02:00:48 +0000 |
commit | 79d880ccb79d98689769fa6556f40989802d05a9 (patch) | |
tree | 970185268f894b1d5ffbeca6a8ad6902b6b94d10 /gtk | |
parent | 20fee708a3119689431488877d7a18662b875747 (diff) | |
download | gtk+-79d880ccb79d98689769fa6556f40989802d05a9.tar.gz |
Fixed bug where right justified menu would overlap last left justified
Sun Apr 5 21:47:12 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkmenubar.c: Fixed bug where right justified
menu would overlap last left justified item.
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkmenubar.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/gtk/gtkmenubar.c b/gtk/gtkmenubar.c index 8bd5e8221d..bb849bece8 100644 --- a/gtk/gtkmenubar.c +++ b/gtk/gtkmenubar.c @@ -149,6 +149,12 @@ gtk_menu_bar_size_request (GtkWidget *widget, requisition->width += child->requisition.width; requisition->height = MAX (requisition->height, child->requisition.height); + /* Support for the right justified help menu */ + if ( (children == NULL) && (GTK_IS_MENU_ITEM(child)) + && (GTK_MENU_ITEM(child)->right_justify)) + { + requisition->width += CHILD_SPACING; + } nchildren += 1; } @@ -210,10 +216,11 @@ gtk_menu_bar_size_allocate (GtkWidget *widget, /* Support for the right justified help menu */ if ( (children == NULL) && (GTK_IS_MENU_ITEM(child)) - && (GTK_MENU_ITEM(child)->right_justify)) { - child_allocation.x = allocation->width - - child_allocation.width - CHILD_SPACING - offset; - } + && (GTK_MENU_ITEM(child)->right_justify)) + { + child_allocation.x = allocation->width - + child->requisition.width - CHILD_SPACING - offset; + } if (GTK_WIDGET_VISIBLE (child)) { child_allocation.width = child->requisition.width; |