I've just written a similar widget. You should subclass GtkMenuItem, override toggle_size_request, return zero to the *requistion parameter.
implement the creation methed new_with_label(), put a GtkLabel as the child of the bin in the creation method. You may also need to override size_allocate and size_request method. Good Luck! Yu On Wed, 2008-12-24 at 16:35 -0500, Tristan Van Berkom wrote: > On Wed, Dec 24, 2008 at 2:18 PM, Peter Clifton <pc...@cam.ac.uk> wrote: > > Hi, > > > > I'm wanting to make a menu-bar item without any offset allocated due to > > "toggle-size" (space left to line up all GtkMenuItems icons / > > accelerators). > > > > What I want to implement is something which looks like the screen-shot > > here: > > > > http://live.gnome.org/UsabilityProject/Whiteboard/Menus > > Hmm, I reported a related bug... > > http://bugzilla.gnome.org/show_bug.cgi?id=564063 > > You may want to discuss your opinion about that behavior > on the said bug, or on gtk-devel-list... personally I think it > should be a configurable property of the GtkMenuItem, > whether to add a default left margin even when there are > no icons, or not. > > If we were really fancy we could allow you to group items > between their separators and have some groups that had margins > for icons or check marks, and some groups dont have margins > (maybe I missed some functionality in gtk+ that already lets you do that...) > > Cheers, > -Tristan > _______________________________________________ > gtk-app-devel-list mailing list > gtk-app-devel-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list