Re: [gtk-list] Label layout



In message <Pine.LNX.3.93.971208151248.615B-100000@kjahds.kjahds.com>,Kenneth A
lbanowski writes:
>
>GtkTooltips have a very nice layout algorithm that tries to make the
>tooltip take up a reasonable rectangle (not to tall or wide) regardless of
>window, screen size, or text length.
>
>I've just been writing a good old fashioned error dialog, which exists
>solely to display a label, and could really a label that has the same
>characteristics of automatic wrap/layout. Anyone care to port
>gtk_tooltips_layout_text to gtk_label, or (better) make this a more
>general-purpose routine?

I have (slowly and privately) been working on patches to gtklabel to
do just this (ie implemement GTK_JUSTIFY_FILL.)  I think my hacks are
to the point where they work pretty well, so I will post/upload my
patches tonight or maybe tomorrow night (at the latest) for your
perusal.

The reason I was motivated to do this, is that I decided to try to
rewrite gtktooltips, to make GtkTooltips into a bona fide widget
(sub-class of GtkWindow).  The main reason for doing this is so that
tooltips colors and fonts can be set using style rc files.  In the
rewrite, it seemed that the filling code should be moved into gtklabel,
where it might be more generally useful.  (I'll post the tooltips
patch as well, as soon I get around to it.)

Jeff



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]