Re: gtktoolbar - packed with invisible widgets ...
- From: Soeren Sandmann <sandmann daimi au dk>
- To: Michael Meeks <michael ximian com>
- Cc: gtk-devel-list gnome org
- Subject: Re: gtktoolbar - packed with invisible widgets ...
- Date: 17 Feb 2004 22:05:45 +0100
Michael Meeks <michael ximian com> writes:
> Hi Soeren,
>
> Just chasing another curious libbonoboui bug (well in fact Arvind did
> most of the work) - with a size-allocated toolbar full of blank-ness; it
> seems the code:
>
> gtk-toolbar.c (gtk_toolbar_size_allocate):
>
> sets up short_size and assigns it to allocations[i].height and also
> item_area.height.
>
> Then it proceeds to do overlaps of these areas - allocations being V/H
> offset - and yet the same height as item_area - thus the areas don't sit
> inside fully and the items are all hidden in the toolbar.
>
> Looks like we need to add some x/ythickness stuff to the item_area
> height to get the != GTK_SHADOW_NONE case to show anything.
Line 1499+:
item_area.x += allocation->x;
item_area.y += allocation->y;
if (get_shadow_type (toolbar) != GTK_SHADOW_NONE)
{
item_area.x += widget->style->xthickness;
item_area.y += widget->style->ythickness;
}
The item_area *is* offset by x/ythickness. And if the bug was as you
said, _no_ items at all would ever show up, which clearly isn't the
case.
> Or is it me ? commenting out the 'translate the items' loop has the
> (side-effect) of rendering the items as you would expect but havn't
> investigated further - not obvious how to re-factor the code for maximum
> beauty here.
If you aren't using CVS HEAD, and libbonoboui is still calling
gtk_container_set_border_width() on the toolbars, then you are seeing
http://bugzilla.gnome.org/show_bug.cgi?id=133070
in which case I'll suggest:
- upgrade to gtk+ HEAD
- stop calling gtk_container_set_border_width() in
libbonoboui.
(And please report bugs in bugzilla).
Søren
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]