Re: GtkToolbar - 2 sizes needed ...
- From: Michael Meeks <michael ximian com>
- To: Soeren Sandmann <sandmann daimi au dk>
- Cc: Gtk Hackers <gtk-devel-list gnome org>, arvind samptur wipro com
- Subject: Re: GtkToolbar - 2 sizes needed ...
- Date: Mon, 12 Jan 2004 16:52:52 +0000
Hi Soeren,
On Mon, 2004-01-12 at 14:50, Soeren Sandmann wrote:
> When the GtkToolbar::show_arrow property is TRUE (which it is by
> default when you use the new API), the size request returns the size
> of the arrow with associated maximum height, just as BonoboUIToolbar.
Ah; ok.
> So, as far as I can see, GtkToolbar behaves like BonoboUIToolbar,
> except that there is no convenient way to get its preferred size.
>
> Not knowing the dock in any detail, what I would recommend for the
> purposes of preferred size, is to treat the GtkToolbar as infinitely
> greedy, ie. have the dock's size allocation first hand out space based
> on requisitions, then give all remaining space to the toolbar.
Well; that's somewhat problematic (and I confess, Ettore wrote this
code some years back). AFAICS if you have 2 toolbars in 1 dock band
(something we test in the tests, and is perhaps used somewhere), it's
not altogether obvious to which to give the space.
Do you end up with a dock-band split in the middle ? something like:
| A B C > | a | or
| A | a b | or
| A | a b c d >|
or, something worse ? with the preferred size, we layout the dock items
left to right reserving space for the expanders (although, you can
imagine more intelligent, proportional schemes for this no-doubt).
> In my opinion, the right way to get "preferred size" information (and
> I agree that it is useful and needed in many cases) would be to
> have an extended size negotiation scheme within gtk+ that would also
> allow stuff like wrapping boxes and widgets reporting baselines.
Right; sounds complicated to me ;-) until then I guess we have to
either claw at the GtkToolbar's children to do our own size-request,
and/or toggle the show_arrow property and grab 2 size requests from it
each time we need one;
Thanks,
Michael.
--
michael ximian com <><, Pseudo Engineer, itinerant idiot
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]