[gnome-clocks] Update css to the new gtk conventions



commit a1809faa84c020f52672412423183740cee08b59
Author: Paolo Borelli <pborelli gnome org>
Date:   Sun Nov 22 17:38:43 2015 +0100

    Update css to the new gtk conventions
    
    Use element names where possible. This is a first minimal update, we
    should probably use element names ourselves instead of classes.

 data/css/gnome-clocks.css |   24 ++++++++++++------------
 src/stopwatch.vala        |    6 ------
 2 files changed, 12 insertions(+), 18 deletions(-)
---
diff --git a/data/css/gnome-clocks.css b/data/css/gnome-clocks.css
index 8522207..eee8a09 100644
--- a/data/css/gnome-clocks.css
+++ b/data/css/gnome-clocks.css
@@ -1,9 +1,9 @@
-ClocksWindow > .frame {
+ClocksWindow > frame {
     background-color: mix(@theme_fg_color, @theme_bg_color, 0.95);
     box-shadow: inset 0 5px 2px -6px black;
 }
 
-ClocksWindow > .frame:backdrop {
+ClocksWindow > frame:backdrop {
     background-color: mix(@theme_unfocused_fg_color, @theme_unfocused_bg_color, 0.95);
     box-shadow: none;
 }
@@ -149,24 +149,24 @@ ClocksWindow > .frame:backdrop {
     border: 0;
 }
 
-.clocks-laps-panel > .frame:dir(ltr) {
+.clocks-laps-panel > frame:dir(ltr) {
     border-image: linear-gradient(to bottom,
                                   mix(@borders,@theme_bg_color,0.5))
                   0 0 0 1 / 20px 0px 20px 1px stretch;
 }
 
-.clocks-laps-panel > .frame:dir(rtl) {
+.clocks-laps-panel > frame:dir(rtl) {
     border-image: linear-gradient(to bottom,
                                   mix(@borders,@theme_bg_color,0.5))
                   0 1 0 0 / 20px 1px 20px 0px stretch;
 }
 
-.clocks-laps-panel .list,
-.clocks-laps-panel .list-row {
+.clocks-laps-panel list,
+.clocks-laps-panel row {
     background-color: transparent;
 }
 
-.clocks-laps-panel .list-row {
+.clocks-laps-panel row {
     padding-left: 20px;
     padding-right: 20px;
     font-size: 14px;
@@ -175,7 +175,7 @@ ClocksWindow > .frame:backdrop {
                   0 0 1 0 / 0 20px 1px 20px stretch;
 }
 
-.clocks-laps-panel .first-lap-row {
+.clocks-laps-panel row:first-child {
     border-image: none;
     border-color: transparent;
 }
@@ -186,18 +186,18 @@ ClocksWindow > .frame:backdrop {
 }
 
 /* disguise insensitive spinbuttons as normal labels */
-.spinbutton.clocks-timer-label,
-.spinbutton.clocks-timer-label .button {
+spinbutton.clocks-timer-label,
+spinbutton.clocks-timer-label button {
     border-color: transparent;
     background-image: none;
     box-shadow: none;
 }
 
-.spinbutton.clocks-timer-label {
+spinbutton.clocks-timer-label {
     color: @theme_fg_color;
 }
 
-.spinbutton.clocks-timer-label .button {
+spinbutton.clocks-timer-label button {
     color: transparent;
 }
 
diff --git a/src/stopwatch.vala b/src/stopwatch.vala
index 01be908..ee984d4 100644
--- a/src/stopwatch.vala
+++ b/src/stopwatch.vala
@@ -273,12 +273,6 @@ public class Face : Gtk.Box, Clocks.Clock {
         }
 
         var row = new LapsRow (n_label, split_label, tot_label);
-
-        // FIXME: we can remove this if ListBox gains support for :first-child
-        if (current_lap == 1) {
-            row.get_style_context ().add_class ("first-lap-row");
-        }
-
         laps_list.prepend (row);
         row.slide_in ();
         laps_scrollwin.vadjustment.value = laps_scrollwin.vadjustment.lower;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]