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.
This commit is contained in:
Owen Taylor 1998-04-06 02:00:48 +00:00 committed by Owen Taylor
parent 20fee708a3
commit 79d880ccb7
8 changed files with 46 additions and 4 deletions

View File

@ -1,3 +1,8 @@
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.
Sun Apr 5 19:30:23 1998 Owen Taylor <owt1@cornell.edu> Sun Apr 5 19:30:23 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkclist.c: Fixed assignment of adjustment->value * gtk/gtkclist.c: Fixed assignment of adjustment->value

View File

@ -1,3 +1,8 @@
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.
Sun Apr 5 19:30:23 1998 Owen Taylor <owt1@cornell.edu> Sun Apr 5 19:30:23 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkclist.c: Fixed assignment of adjustment->value * gtk/gtkclist.c: Fixed assignment of adjustment->value

View File

@ -1,3 +1,8 @@
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.
Sun Apr 5 19:30:23 1998 Owen Taylor <owt1@cornell.edu> Sun Apr 5 19:30:23 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkclist.c: Fixed assignment of adjustment->value * gtk/gtkclist.c: Fixed assignment of adjustment->value

View File

@ -1,3 +1,8 @@
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.
Sun Apr 5 19:30:23 1998 Owen Taylor <owt1@cornell.edu> Sun Apr 5 19:30:23 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkclist.c: Fixed assignment of adjustment->value * gtk/gtkclist.c: Fixed assignment of adjustment->value

View File

@ -1,3 +1,8 @@
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.
Sun Apr 5 19:30:23 1998 Owen Taylor <owt1@cornell.edu> Sun Apr 5 19:30:23 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkclist.c: Fixed assignment of adjustment->value * gtk/gtkclist.c: Fixed assignment of adjustment->value

View File

@ -1,3 +1,8 @@
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.
Sun Apr 5 19:30:23 1998 Owen Taylor <owt1@cornell.edu> Sun Apr 5 19:30:23 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkclist.c: Fixed assignment of adjustment->value * gtk/gtkclist.c: Fixed assignment of adjustment->value

View File

@ -1,3 +1,8 @@
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.
Sun Apr 5 19:30:23 1998 Owen Taylor <owt1@cornell.edu> Sun Apr 5 19:30:23 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkclist.c: Fixed assignment of adjustment->value * gtk/gtkclist.c: Fixed assignment of adjustment->value

View File

@ -149,6 +149,12 @@ gtk_menu_bar_size_request (GtkWidget *widget,
requisition->width += child->requisition.width; requisition->width += child->requisition.width;
requisition->height = MAX (requisition->height, child->requisition.height); 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; nchildren += 1;
} }
@ -210,10 +216,11 @@ gtk_menu_bar_size_allocate (GtkWidget *widget,
/* Support for the right justified help menu */ /* Support for the right justified help menu */
if ( (children == NULL) && (GTK_IS_MENU_ITEM(child)) if ( (children == NULL) && (GTK_IS_MENU_ITEM(child))
&& (GTK_MENU_ITEM(child)->right_justify)) { && (GTK_MENU_ITEM(child)->right_justify))
child_allocation.x = allocation->width - {
child_allocation.width - CHILD_SPACING - offset; child_allocation.x = allocation->width -
} child->requisition.width - CHILD_SPACING - offset;
}
if (GTK_WIDGET_VISIBLE (child)) if (GTK_WIDGET_VISIBLE (child))
{ {
child_allocation.width = child->requisition.width; child_allocation.width = child->requisition.width;