Codebase list sugar-artwork / 813a2d7
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. Sam Parkinson 8 years ago
1 changed file(s) with 11 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
00 ${
11 import math
2 from gi.repository import Gtk
3
4 gtk_major = int(Gtk.get_major_version())
5 gtk_minor = int(Gtk.get_minor_version())
6 treeview_pseudo_element = gtk_major >= 3 and gtk_minor > 8
27
38 def my_floor(num):
49 return int(math.floor(num))
220225 border-width: 0px;
221226 }
222227
223 GtkTreeView row:nth-child(even) {
228 $[if treeview_pseudo_element] GtkTreeView row:even
229 $[else] GtkTreeView row:nth-child(even)
230 $[end if] {
224231 background-color: @row_even;
225232 }
226 GtkTreeView row:nth-child(odd) {
233 $[if treeview_pseudo_element] GtkTreeView row:odd
234 $[else] GtkTreeView row:nth-child(odd)
235 $[end if] {
227236 background-color: @row_odd;
228237 }
229238