[Pkg-sugar-commit] [sugar-artwork] 01/08: Fix treeview background, fixes #4855

Jonas Smedegaard dr at jones.dk
Fri Jul 3 00:22:44 UTC 2015


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository sugar-artwork.

commit 813a2d77d83284b031a4f2bd5775b9f82b12846e
Author: Sam Parkinson <sam.parkinson3 at gmail.com>
Date:   Tue Jun 23 17:13:56 2015 +1000

    Fix treeview background, fixes #4855
    
    This also therefore fixes #4857
    
    This also introduces the requirement of using gi.repository.Gtk
    during build time of sugar artwork.
---
 gtk3/theme/gtk-widgets.css.em | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/gtk3/theme/gtk-widgets.css.em b/gtk3/theme/gtk-widgets.css.em
index e2d8037..6dd95ac 100644
--- a/gtk3/theme/gtk-widgets.css.em
+++ b/gtk3/theme/gtk-widgets.css.em
@@ -1,5 +1,10 @@
 ${
 import math
+from gi.repository import Gtk
+
+gtk_major = int(Gtk.get_major_version())
+gtk_minor = int(Gtk.get_minor_version())
+treeview_pseudo_element = gtk_major >= 3 and gtk_minor > 8
 
 def my_floor(num):
     return int(math.floor(num))
@@ -221,10 +226,14 @@ column-header .button:hover:active {
     border-width: 0px;
 }
 
-GtkTreeView row:nth-child(even) {
+$[if treeview_pseudo_element] GtkTreeView row:even
+$[else] GtkTreeView row:nth-child(even)
+$[end if] {
     background-color: @row_even;
 }
-GtkTreeView row:nth-child(odd) {
+$[if treeview_pseudo_element] GtkTreeView row:odd
+$[else] GtkTreeView row:nth-child(odd)
+$[end if] {
     background-color: @row_odd;
 }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-sugar/sugar-artwork.git



More information about the pkg-sugar-commit mailing list