[PATCH] fix GtkOptionMenu initial sizing



i have fixed the bug where GtkOptionMenu will initially be too big.

this screenshot shows the bug:

http://primates.ximian.com/~jacob/gnome2/optionmenu.png

the top one had an item selected in it; if you were to select an item in
the bottom one it would snap to the correct size.

the patch is pretty obvious when you read it.

ok to commit, or is there a bug # i should attach it to?  i found a
couple of gtkoptionmenu bugs but none seemed to be this one.

jacob
-- 
"In fact, can you imagine anything more terrifying than a zombie clown?"
	-- moby
Index: gtkoptionmenu.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkoptionmenu.c,v
retrieving revision 1.58
diff -u -r1.58 gtkoptionmenu.c
--- gtkoptionmenu.c	2001/12/04 03:27:29	1.58
+++ gtkoptionmenu.c	2001/12/12 21:33:52
@@ -461,7 +461,7 @@
 			 MAX (child_requisition.height, option_menu->height) +
 			 CHILD_TOP_SPACING + CHILD_BOTTOM_SPACING + props.focus_width * 2);
 
-  tmp = (requisition->height - option_menu->height +
+  tmp = (requisition->height - MAX (child_requisition.height, option_menu->height) +
 	 props.indicator_size.height + props.indicator_spacing.top + props.indicator_spacing.bottom);
   requisition->height = MAX (requisition->height, tmp);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]