[gtk+] Adwaita: Update levelbar rendering



commit 2a0024ebe2382c94adeec7dec0ba75a8f4f4fae0
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Nov 11 00:26:32 2015 -0500

    Adwaita: Update levelbar rendering
    
    Adapt to the changes in the previous commit.

 gtk/theme/Adwaita/_common.scss           |   51 ++++++++++++++--------------
 gtk/theme/Adwaita/gtk-contained-dark.css |   54 +++++++++++++++--------------
 gtk/theme/Adwaita/gtk-contained.css      |   54 +++++++++++++++--------------
 3 files changed, 81 insertions(+), 78 deletions(-)
---
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index 9872c04..631bf61 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -2422,7 +2422,7 @@ progressbar.vertical progress {
  * Level Bar *
  *************/
 
-.level-bar {
+levelbar {
   box-shadow: _widget_edge(); // needs to be set here to avoid clipping
   -GtkLevelBar-min-block-width: 34;
   -GtkLevelBar-min-block-height: 3;
@@ -2430,7 +2430,7 @@ progressbar.vertical progress {
     -GtkLevelBar-min-block-width: 3;
     -GtkLevelBar-min-block-height: 34;
   }
-  &.trough {
+  & trough {
     border: 1px solid;
     padding: 2px;
     border-radius: 3px;
@@ -2439,11 +2439,11 @@ progressbar.vertical progress {
       @include entry(backdrop);
     }
   }
-  &.fill-block {
-    // FIXME: it would be nice to set make fill blocks bigger, but we'd need
-    // :nth-child working on discrete indicators
+  &.horizontal block.discrete { margin: 0 1px; }
+  &.vertical block.discrete { margin: 1px 0; }
+  & block.filled {
     border: 1px solid if($variant=='light', darken($selected_bg_color,10%),
-                                            darken($selected_bg_color,5%));
+                                              darken($selected_bg_color,5%));
     background-color: $selected_bg_color;
     box-shadow: 0 1px transparentize(black, 0.9);
     border-radius: 1px;
@@ -2451,27 +2451,26 @@ progressbar.vertical progress {
       border-color: $selected_bg_color;
       box-shadow: none;
     }
-    &.indicator-discrete {
-      &.horizontal { margin: 0 1px; }
-      &.vertical { margin: 1px 0; }
-    }
-    &.level-high {
-      border-color: darken($success_color,10%);
-      background-color: $success_color;
-      &:backdrop { border-color: $success_color; }
-    }
-    &.level-low {
-      border-color: darken($warning_color,10%);
-      background-color: $warning_color;
-      &:backdrop { border-color: $warning_color; };
-    }
-    &.empty-fill-block {
-      background-color: transparent;
-      border-color: if($variant=='light', transparentize($fg_color,0.8),
+  }
+  & block.level-high {
+    border-color: darken($success_color,10%);
+    background-color: $success_color;
+    &:backdrop { border-color: $success_color; }
+  }
+  & block.level-low {
+    border-color: darken($warning_color,10%);
+    background-color: $warning_color;
+    &:backdrop { border-color: $warning_color; };
+  }
+  & block.empty {
+    border: 1px solid if($variant=='light', darken($selected_bg_color,10%),
+                                              darken($selected_bg_color,5%));
+    border-radius: 1px;
+    background-color: transparent;
+    border-color: if($variant=='light', transparentize($fg_color,0.8),
                        transparentize($fg_color,0.9));
-      box-shadow: none;
-      &:backdrop { border-color: transparentize($backdrop_fg_color,0.85); }
-    }
+    box-shadow: none;
+    &:backdrop { border-color: transparentize($backdrop_fg_color,0.85); }
   }
 }
 
diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css
index 7b7df69..7174e9f 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -3367,14 +3367,14 @@ progressbar.vertical progress {
 /*************
  * Level Bar *
  *************/
-.level-bar {
+levelbar {
   box-shadow: 0 1px rgba(238, 238, 236, 0.1);
   -GtkLevelBar-min-block-width: 34;
   -GtkLevelBar-min-block-height: 3; }
-  .level-bar.vertical {
+  levelbar.vertical {
     -GtkLevelBar-min-block-width: 3;
     -GtkLevelBar-min-block-height: 34; }
-  .level-bar.trough {
+  levelbar trough {
     border: 1px solid;
     padding: 2px;
     border-radius: 3px;
@@ -3383,41 +3383,43 @@ progressbar.vertical progress {
     color: white;
     border-color: #1c1f1f;
     box-shadow: inset 0 0 0 1px rgba(33, 93, 156, 0), 0 1px rgba(238, 238, 236, 0.1); }
-    .level-bar.trough:backdrop {
+    levelbar trough:backdrop {
       background-color: transparent;
       background-image: linear-gradient(to bottom, #1d2020, #242525 3px, #292929 90%);
       color: #d5d5d5;
       border-color: #1f2222;
       background-image: linear-gradient(to bottom, #2c2c2c);
       box-shadow: 0 1px rgba(238, 238, 236, 0); }
-  .level-bar.fill-block {
+  levelbar.horizontal block.discrete {
+    margin: 0 1px; }
+  levelbar.vertical block.discrete {
+    margin: 1px 0; }
+  levelbar block.filled {
     border: 1px solid #1c5187;
     background-color: #215d9c;
     box-shadow: 0 1px rgba(0, 0, 0, 0.1);
     border-radius: 1px; }
-    .level-bar.fill-block:backdrop {
+    levelbar block.filled:backdrop {
       border-color: #215d9c;
       box-shadow: none; }
-    .level-bar.fill-block.indicator-discrete.horizontal {
-      margin: 0 1px; }
-    .level-bar.fill-block.indicator-discrete.vertical {
-      margin: 1px 0; }
-    .level-bar.fill-block.level-high {
-      border-color: #40760c;
-      background-color: #5aa411; }
-      .level-bar.fill-block.level-high:backdrop {
-        border-color: #5aa411; }
-    .level-bar.fill-block.level-low {
-      border-color: #c26000;
-      background-color: #f57900; }
-      .level-bar.fill-block.level-low:backdrop {
-        border-color: #f57900; }
-    .level-bar.fill-block.empty-fill-block {
-      background-color: transparent;
-      border-color: rgba(238, 238, 236, 0.1);
-      box-shadow: none; }
-      .level-bar.fill-block.empty-fill-block:backdrop {
-        border-color: rgba(148, 151, 150, 0.15); }
+  levelbar block.level-high {
+    border-color: #40760c;
+    background-color: #5aa411; }
+    levelbar block.level-high:backdrop {
+      border-color: #5aa411; }
+  levelbar block.level-low {
+    border-color: #c26000;
+    background-color: #f57900; }
+    levelbar block.level-low:backdrop {
+      border-color: #f57900; }
+  levelbar block.empty {
+    border: 1px solid #1c5187;
+    border-radius: 1px;
+    background-color: transparent;
+    border-color: rgba(238, 238, 236, 0.1);
+    box-shadow: none; }
+    levelbar block.empty:backdrop {
+      border-color: rgba(148, 151, 150, 0.15); }
 
 /**********
  * Frames *
diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css
index 6eced31..709f0fc 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -3529,14 +3529,14 @@ progressbar.vertical progress {
 /*************
  * Level Bar *
  *************/
-.level-bar {
+levelbar {
   box-shadow: 0 1px white;
   -GtkLevelBar-min-block-width: 34;
   -GtkLevelBar-min-block-height: 3; }
-  .level-bar.vertical {
+  levelbar.vertical {
     -GtkLevelBar-min-block-width: 3;
     -GtkLevelBar-min-block-height: 34; }
-  .level-bar.trough {
+  levelbar trough {
     border: 1px solid;
     padding: 2px;
     border-radius: 3px;
@@ -3545,41 +3545,43 @@ progressbar.vertical progress {
     color: black;
     border-color: #a1a1a1;
     box-shadow: inset 0 0 0 1px rgba(74, 144, 217, 0), 0 1px white; }
-    .level-bar.trough:backdrop {
+    levelbar trough:backdrop {
       background-color: transparent;
       background-image: linear-gradient(to bottom, #dedede, #f8f8f8 3px, #ffffff 90%);
       color: #333333;
       border-color: darkgray;
       background-image: linear-gradient(to bottom, white);
       box-shadow: 0 1px rgba(255, 255, 255, 0); }
-  .level-bar.fill-block {
+  levelbar.horizontal block.discrete {
+    margin: 0 1px; }
+  levelbar.vertical block.discrete {
+    margin: 1px 0; }
+  levelbar block.filled {
     border: 1px solid #2a76c6;
     background-color: #4a90d9;
     box-shadow: 0 1px rgba(0, 0, 0, 0.1);
     border-radius: 1px; }
-    .level-bar.fill-block:backdrop {
+    levelbar block.filled:backdrop {
       border-color: #4a90d9;
       box-shadow: none; }
-    .level-bar.fill-block.indicator-discrete.horizontal {
-      margin: 0 1px; }
-    .level-bar.fill-block.indicator-discrete.vertical {
-      margin: 1px 0; }
-    .level-bar.fill-block.level-high {
-      border-color: #5aa411;
-      background-color: #73d216; }
-      .level-bar.fill-block.level-high:backdrop {
-        border-color: #73d216; }
-    .level-bar.fill-block.level-low {
-      border-color: #c26000;
-      background-color: #f57900; }
-      .level-bar.fill-block.level-low:backdrop {
-        border-color: #f57900; }
-    .level-bar.fill-block.empty-fill-block {
-      background-color: transparent;
-      border-color: rgba(46, 52, 54, 0.2);
-      box-shadow: none; }
-      .level-bar.fill-block.empty-fill-block:backdrop {
-        border-color: rgba(142, 145, 146, 0.15); }
+  levelbar block.level-high {
+    border-color: #5aa411;
+    background-color: #73d216; }
+    levelbar block.level-high:backdrop {
+      border-color: #73d216; }
+  levelbar block.level-low {
+    border-color: #c26000;
+    background-color: #f57900; }
+    levelbar block.level-low:backdrop {
+      border-color: #f57900; }
+  levelbar block.empty {
+    border: 1px solid #2a76c6;
+    border-radius: 1px;
+    background-color: transparent;
+    border-color: rgba(46, 52, 54, 0.2);
+    box-shadow: none; }
+    levelbar block.empty:backdrop {
+      border-color: rgba(142, 145, 146, 0.15); }
 
 /**********
  * Frames *


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