Change GtkLevelBar bar color
- From: Victor Aurélio <victoraur santos gmail com>
- To: "gtk-app-devel-list gnome org" <gtk-app-devel-list gnome org>
- Subject: Change GtkLevelBar bar color
- Date: Sun, 14 Jul 2013 23:24:02 -0300
Hi,
How to change color GtkLevelBar's bar ?
In example 52 [1] there's a example of css that isn't work.
I've following piece of code:
const gchar css_bar[] =
".level-bar.fill-block.level-low {"
" background-color: green;"
"}"
".level-bar.fill-block.level-warn {"
" background-color: yellow;"
"}"
".level-bar.fill-block.level-over {"
" background-color: red;"
"}";
GtkCssProvider * css_provider;
GdkScreen * screen;
// ... following within main
css_provider = gtk_css_provider_new();
screen = gdk_screen_get_default();
gtk_css_provider_load_from_data(css_provider, css_bar, -1, NULL);
gtk_style_context_add_provider_for_screen(screen, GTK_STYLE_PROVIDER
(css_provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
g_object_unref(css_provider);
but it changes the background of bar, and I'm looking for a way of
change the bar color.
[1]
https://developer.gnome.org/gtk3/stable/GtkLevelBar.html#id-1.5.5.7.9.4.1
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]