> Date: Fri, 21 Apr 2017 09:01:54 +
> From: R?ben Rodrigues
> To: "gtk-app-devel-list@gnome.org"
> Subject: CheckButton background color
> Message-ID:
>
>
>
> Content-Type: text/plain; charset="utf-8"
>
> Hi,
>
> Someone knows how to change gtkcheckbutton background and size in CSS?
The GNU Denemo program uses this function that changes the background
color of a widget:
void set_background_color(GtkWidget *w, gchar *color)
{
GtkCssProvider *gcp;
GtkStyleContext *gsc;
gsc = gtk_widget_get_style_context(w);
const gchar *type = g_type_name (G_TYPE_FROM_INSTANCE (w));
gchar *str = g_strdup_printf ("%s {background-color: %s;}", type,
color);
gcp= gtk_css_provider_new();
gtk_css_provider_load_from_data(gcp, str, -1, 0);
g_free (str);
gtk_style_context_add_provider(gsc, GTK_STYLE_PROVIDER(gcp),
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
}
HTH
Richard Shann
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list