Re: Notify signal font size has changed

Am 08.09.2014 22:20, schrieb Torsten Schoenfeld:
On 08.09.2014 09:16, Thomas Funk wrote:
I'm developing a RAD library to create GUI applications based on Gtk2::Fixed.

First, are you aware of Glade and GtkBuilder?
Yes, of course. But there're some problems with them:
1. not all widgets are available depending on the lib version installed on a system.
2. the creation of a GUI with Glade isn't mostly the problem but getting access to 
   different elements.
3. some widgets can't be created in Glade like Treeviews/lists - only the skeletal 
   structure. The rest is coding by hand
4. GtkBuilder lacks with dynamic layouts e.g. appending/deleting of notebook tabs.
5. the creation of a layout in Gtk is ... very flexible and needs practice ;-)

Second, are you absolutely sure you want to use GtkFixed as a basis, as
opposed to, say, the box model based on GtkBox?
Yes. I know the problems described in the GtkFixed docu. But it's so damned easy 
to create a GUI with it that I hazard the consequences. And the most people want 
creating a GUI fast and without hours in google and with a long learn curve to 
understand Gtk it's design.

So I thought catching the event which signals Gtk to switch the font size would
be fine to rescale all the fixed widgets.

In principle, GtkSettings' "notify::gtk-font-name" can be used for this,
but it's not available in perl-Gtk2, only perl-Gtk3:

perl -MGtk3=-init -E'my $s = Gtk3::Settings::get_default (); say $s->get
("gtk-font-name"); $s->signal_connect ("notify::gtk-font-name", sub {
say $s->get ("gtk-font-name") }); Gtk3::main ();'

What a pitty :-(

To be honest I don't dare Gtk3-Perl at the moment - I red from time to time here 
on the list about problems with Gtk3 ... So I'll wait a some time before trying it...

Thank you very much for the fast reply :-)

Ok, keep on searching for a solution ... perhaps I find something ... or someone else
has another hint? ...


"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."   --   
Albert Einstein

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