Re: change alternate treeview row color with css
- From: Bernhard Schuster <schuster bernhard gmail com>
- To: Rudra Banerjee <rudra banerjee aol co uk>
- Cc: gtk devel <gtk-app-devel-list gnome org>
- Subject: Re: change alternate treeview row color with css
- Date: Fri, 1 Feb 2013 22:16:49 +0100
See example 26
http://developer.gnome.org/gtk3/unstable/GtkCssProvider.html
2013/1/25 Rudra Banerjee <rudra banerjee aol co uk>:
I tried to change alternate row color of TreeView using css as:
GtkCssProvider *provider = gtk_css_provider_new ();
gtk_css_provider_load_from_data (provider, "GtkTreeView {\n"
" .row:nth-child(even): green;\n"
" .row:nth-child(odd):red;\n"
"}\n", -1, NULL);
GdkDisplay *display = gdk_display_get_default ();
GdkScreen *screen = gdk_display_get_default_screen (display);
gtk_style_context_add_provider_for_screen (screen,
GTK_STYLE_PROVIDER (provider),
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
g_object_unref (provider);
This is giving runtime warning:
(mkbib:6745): Gtk-WARNING **: Theme parsing error: <data>:2:1: Expected
semicolon
(mkbib:6745): Gtk-WARNING **: Theme parsing error: <data>:3:1: Expected
semicolon
Where I went wrong?
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]