[patch] Multi-line labels and enhanced tooltips



Ok, here it is the multi-line label widget and a modified
gtktooltips widget.
Now you can say gtk_label_new("A label\nthat spawns\nmany lines.")
and gtk_label_set_justify(label, GTK_JUSTIFY_{LEFT,RIGHT,CENTER}).
I modified the gtk_label widget: maybe we should add a "set" signal
to it?
In gtklabel.c I've embedded a test program that shows the
interaction between alignment and justification (define TEST).

In the modified tooltips you can say something like this:
gtk_tooltips_set_tip(tooltips, widget, another_widget);
another_widget can be almost anything you can add to
a container (tooltips->tip_window). Almost because if you
add a button, it cannot receive events: the tip window gets
popped down when you "leave" widget, of course.
The old gtk_tooltips_set_tips() call just builds a label
and calls gtk_tooltips_set_tip() so you should break the text
with "\n"s.
I haven't removed the tooltips_set_colors() call: is it
useful now? I use the colors only to draw a black rectangle
around the window...

Comments are welcome.

lupus

-- 
------   
--      Molaro Paolo  lupus@dei.unipd.it    lupus@maya.dei.unipd.it
------  Mamge', mange': nu sei chi ve mangia'. [FdA]

patch



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