Re: Gtk::STYLE_PROVIDER_PRIORITY_APPLICATION



Most of the gtkmm documentation has been copied from gtk+ and "translated" to C++ by the gmmproc command in glibmm. Like other automatic translation, this translation is far from perfect. GTK_STYLE_PROVIDER_PRIORITY_APPLICATION looks like the name of an enum constant, so it gets translated to what it would have been called, if it had been part of an enum. In fact it's a preprocessor #define. This is the kind of imperfection that you will find here and there in the gtkmm and glibmm documentation. You may also find the opposite kind of imperfection: A name that has not been translated from C to C++ although it should have been.

You can use one of the GTK_STYLE_PROVIDER_PRIORITY_* constants in Gtk::StyleContext::add_provider().

You may also want to know that the Gtk::Widget::override_*() methods have been deprecated from gtk+/gtkmm 3.16. IMO, it's unfortunate. They are useful.

Kjell

Den 2015-05-30 16:36, Phil Wolff skrev:
>From the docs on Gtk::Widget::override_color:

"Note that for complex widgets this may bring in undesired results (such
as uniform background color everywhere), in these cases it is better to
fully style such widgets through a Gtk::CssProvider with the
Gtk::STYLE_PROVIDER_PRIORITY_APPLICATION priority."

I can't find a GTKMM definition for
Gtk::STYLE_PROVIDER_PRIORITY_APPLICATION, although
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION is defined in the GTK+ headers.

Oversight? Bug?




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