Re: Theme switching



Since you are just changing various GtkSettings, it would be better to
use the GtkSettings API:

g_object_set (gtk_settings_get_default (),
             "gtk-theme-name", "HighContrastInverse",
             "gtk-font-name", "Sans 10",
             NULL);


Your original approach may not be working because the values could be
overridden by the system (xsettings) values.

Thanks, just found the API for myself.
This worked for me:

GtkSettings* settings = gtk_settings_get_default();
gtk_settings_set_string_property(settings, "gtk-theme-name", szTheme, NULL);

Regards,
 Miroslav




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