GNOME Bugzilla – Bug 336031
Wrong size of GtkHBox in GtkImageMenuItem
Last modified: 2013-08-14 02:53:05 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.
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.
GtkImageMenuItem has been deprecated