Re: [gtk-list] Re: allocate/requisition handling
- From: John Cupitt <john cupitt ng-london org uk>
- CC: gtk-list redhat com
- Subject: Re: [gtk-list] Re: allocate/requisition handling
- Date: Wed, 23 Feb 2000 17:18:36 +0000
Tim Janik wrote:
> gtk_container_queue_resize() is an internal function, never use it directly.
> instead, you either want gtk_widget_queue_resize (menu_bar->child) (this
> pretty much amounts to gtk_container_queue_resize (menu_bar)) or
> gtk_widget_queue_resize (menu_bar);
OK, thanks, I changed it to gtk_widget_queue_resize (menu_bar).
> how do you handle right justified menu items with the wrapping code btw?
> (though there actually can only be *one* right justified item currently,
> regardless of its visibility state even, another thing that needs fixing
> with the menu code.)
I just did:
if ((children == NULL) && (GTK_IS_MENU_ITEM(child))
&& (GTK_MENU_ITEM(child)->right_justify))
{
child_allocation.x = allocation->width -
child_requisition.width - xborder;
child_allocation.y = allocation->height -
child_requisition.height - yborder;
}
so the help menu always goes at the bottom right. It works if there's
only one right-justified menu item.
Is wrapping a generally useful thing? I could make it into a patch, with
"GtkMenuBar::wrap" to turn it on and off (off by default, I guess).
John
--
John Cupitt, john.cupitt@ng-london.org.uk, +44 (0)171 747 2570
VASARI Lab, The National Gallery, Trafalgar Square, London, WC2N 5DN
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]