[Sugar-devel] [PATCH sugar-artwork 2/2] Set background color for	GtkTreeView rows with odd-even flags SL #3726
    Manuel Quiñones 
    manuq at laptop.org
       
    Mon Jun 25 07:54:28 EDT 2012
    
    
  
This is only applied if the GtkTreeView has the "rules-hint" property
set to True.
Signed-off-by: Manuel Quiñones <manuq at laptop.org>
---
 gtk3/theme/gtk-widgets.css.em |    7 +++++++
 gtk3/theme/gtk.css            |    2 ++
 2 files changed, 9 insertions(+)
diff --git a/gtk3/theme/gtk-widgets.css.em b/gtk3/theme/gtk-widgets.css.em
index 91c998c..f3e4fde 100644
--- a/gtk3/theme/gtk-widgets.css.em
+++ b/gtk3/theme/gtk-widgets.css.em
@@ -215,6 +215,13 @@ GtkToggleButton.button:active GtkLabel {
     background-color: @white;
 }
 
+GtkTreeView row:nth-child(even) {
+    background-color: @row_even;
+}
+GtkTreeView row:nth-child(odd) {
+    background-color: @row_odd;
+}
+
 .entry {
     border-radius: $(2 * subcell_size)px;
     border-width: $(thickness)px;
diff --git a/gtk3/theme/gtk.css b/gtk3/theme/gtk.css
index 7c95e5f..8b55cc6 100644
--- a/gtk3/theme/gtk.css
+++ b/gtk3/theme/gtk.css
@@ -6,6 +6,8 @@
 @define-color selection_grey #A6A6A6;
 @define-color panel_grey #C0C0C0;
 @define-color text_field_grey #E5E5E5;
+ at define-color row_even #E5E5E5;
+ at define-color row_odd #D5D5D5;
 @define-color white #FFFFFF;
 
 /* Default color scheme */
-- 
1.7.10.2
    
    
More information about the Sugar-devel
mailing list