On Sun, May 06, 2007 at 10:22:52AM +0530, Gaurav Jain wrote: > > I'm trying to create some GtkImageMenuItems in the menu of my > application, and I found strange sizing issues. > > I noticed that even if the height of the GtkImage that is added to the > menu item is 16 pixels, the actual height of the menu item that is > shown on the screen is dependent on the width of the GtkImage. In > other words, if I have a GtkImage of 32 X 16 added to the menu item, > the height of the entire menu item becomes around 32 pixels. > > This is strange behavior, as I expected the height to remain at around > 16 pixels since the GtkImage's height is only 16. If in the same menu > I add other menu items without any GtkImage then their height is > normal. > > Is this a GTK bug? Is there a workaround that I can use to ensure > that the height of the menu item doesn't increase unnecessarily?
The height requested is something like max(height, width). It has been `working' this way since Gtk+ 2.4 (and it broke my apps at that time). It seems to be already reported: http://bugzilla.gnome.org/show_bug.cgi?id=336031 I suppose everyone affected just shrugs and packs an image + label to the menu item himself instead of using GtkImageMenuItem (that's what I do too). Yeti -- http://gwyddion.net/ _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list