After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 336031 - Wrong size of GtkHBox in GtkImageMenuItem
Wrong size of GtkHBox in GtkImageMenuItem
Status: RESOLVED WONTFIX
Product: gtk+
Classification: Platform
Component: Widget: GtkMenu
2.8.x
Other All
: Normal minor
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2006-03-26 01:46 UTC by Alexandre Bique
Modified: 2013-08-14 02:53 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12



Description Alexandre Bique 2006-03-26 01:46:23 UTC
Please describe the problem:
I don't know if it is a bug, but it looks like.

If i put a GtkHBox as the image in a GtkImageMenuItem there is a problem :
 - One thing into the GtkHBox -> no problems
 - Two or more things into the GtkHBox -> the size of the GtkHBox goes wrong

Here a part of my code : http://pastebin.com/622571
Some screenshots : http://babali.free.fr/test5.png
http://babali.free.fr/test6.png http://babali.free.fr/test7.png

Steps to reproduce:
By using my code :)

Actual results:


Expected results:


Does this happen every time?


Other information:
Yes, Cwiiis told me to add a GtkLabel into my GtkHBox and package it into a
GtkMenuItem. It solved the problem.
Comment 1 Yeti 2007-05-06 12:26:15 UTC
Method toggle_size_request() returns only one size with unclear inrepretation -- is it width, height, or what? -- instead of two dimensions.  This size is then used in gtk_menu_size_request() in both width and height calculations.  Evidently, it cannot always get the size right when width != height.

I cannot see how to fix this without changing the API -- at least in the sense of introduction of a new one that provides the complete size information.  It's funny it worked in Gtk+ 2.0 and 2.2 -- probably at the expense of some other case being broken.  When 2.4 fixed that other case it broke this one.
Comment 2 Matthias Clasen 2013-08-14 02:53:05 UTC
GtkImageMenuItem has been deprecated