Re: Making it easier to change a font.



Marco Scholten writes:
 >
 > We could do cool stuff like packing some labels and entry's in a table and  
 > then call Gtk::Table::modify_font() to change all the labels and entry's  
 > at once.

I don't think it's that great for "non bin" containers such as table
(especially if modify_*() is used internally) or great care should be
taken not override settings the user made.

Imagine a two column table with the left column using one font and
the right column using another (because programmer took care to make
it so) and something coming along calling modify_font() on what holds
the table which propagates the modification to the table, which in turn
changes the appearance of the labels ...

You have the same issue with Gtk::Bin like containers, but your suggestion
makes more sense (to me) for those.  I don't really think of tables,
boxes, layouts and stuff as widget's that "have (or should have)" fonts.

 > Perhaps this can be done for more functions then just modify_font.

if the function had a separate signature such as modify_all_*(), like
show() vs show_all(), none of it would be problem ... somebody calling
the "all" version of function should be aware of repercussions, or would
soon be :)



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