Gtk3 port theming

Landry Breuil landry.breuil at
Tue May 17 11:50:33 CEST 2016

In that particular context, i dont know if this is "the recommended
way", but the color is a user setting for the label or the
progressbar, so whatever the theme does, the user wants the color he
has set in the dialog to be used....
If you have a better way, i'm all ears.

On Sun, May 15, 2016 at 2:37 PM,  <flo.xfce at> wrote:
> Hi all,
> in Landrys porting efforts of various panel plugins (and I have seen it
> in other applications, too) I came across code like this:
> css = g_strdup_printf("label { color: %s; }", gdk_rgba_to_string(color));
> css_provider = gtk_css_provider_new ();
> gtk_css_provider_load_from_data (css_provider, css, strlen(css), NULL);
> This looks really hacky to me, so my question: Is this the recommended
> way of setting widget styles independet of the user's theme? In Xfce
> there are multiple situation where we allow overwriting of the theme,
> for example the panel where you can set custom backgrounds. I'm just
> curious what would be the right way of achieving this.
> Kind regards
> _______________________________________________
> Xfce4-dev mailing list
> Xfce4-dev at

More information about the Xfce4-dev mailing list