[gtk+] High Contrast: switch style fix



commit 50b58206697f08ce0e4bff7e80d79b49b2c2444e
Author: Lapo Calamandrei <calamandrei gmail com>
Date:   Fri Mar 18 19:25:09 2016 +0100

    High Contrast: switch style fix

 gtk/theme/HighContrast/_common.scss              |   46 +++++++--------
 gtk/theme/HighContrast/gtk-contained-inverse.css |   68 +++++++++++-----------
 gtk/theme/HighContrast/gtk-contained.css         |   68 +++++++++++-----------
 3 files changed, 88 insertions(+), 94 deletions(-)
---
diff --git a/gtk/theme/HighContrast/_common.scss b/gtk/theme/HighContrast/_common.scss
index e65f24d..dc5a9c0 100644
--- a/gtk/theme/HighContrast/_common.scss
+++ b/gtk/theme/HighContrast/_common.scss
@@ -2004,30 +2004,28 @@ switch {
           border-color: $insensitive_fg_color;
         }
     }
-    & slider {
-      margin: -1px;
-      min-width: 45px;
-      min-height: 27px;
-      border: 1px solid;
-      border-radius: 3px;
-      @include button(normal, $edge: none);
-      box-shadow: inset 0 1px white,
-                  inset 0 -2px transparentize($bg_color,0.4),
-                  inset 0 -1px mix($bg_color,$borders_color,50%);
-      &:hover {
-        @include button(hover, $edge: none);
-        box-shadow: inset 0 1px white,
-                    inset 0 -2px transparentize($bg_color,0.4),
-                    inset 0 -1px mix($bg_color,$borders_color,50%);
-      }
-      &:active { border-color: $selected_borders_color; }
-      &:disabled { @include button(insensitive, $edge: none); }
-      &:backdrop { @include button(backdrop);
-        &:active{ border-color: $backdrop_borders_color; }
-        &:disabled {
-          @include button(backdrop-insensitive);
-        }
-      }
+
+    slider {
+        margin: -1px;
+        min-width: 45px;
+        min-height: 27px;
+        border: 2px solid;
+        border-radius: 3px;
+        @include button(normal);
+    }
+
+    &:hover slider { @include button(hover); }
+
+    &:active slider { border: 2px solid $selected_borders_color; }
+
+    &:disabled slider { @include button(insensitive); }
+
+    &:backdrop {
+        slider { @include button(backdrop); }
+
+        &:active slider { border-color: if($variant == 'light', $selected_bg_color, 
$selected_borders_color); }
+
+        &:disabled slider { @include button(backdrop-insensitive); }
     }
 }
 
diff --git a/gtk/theme/HighContrast/gtk-contained-inverse.css 
b/gtk/theme/HighContrast/gtk-contained-inverse.css
index 244a133..a1f11fd 100644
--- a/gtk/theme/HighContrast/gtk-contained-inverse.css
+++ b/gtk/theme/HighContrast/gtk-contained-inverse.css
@@ -2084,48 +2084,46 @@ switch {
     margin: -1px;
     min-width: 45px;
     min-height: 27px;
-    border: 1px solid;
+    border: 2px solid;
     border-radius: 3px;
     border-width: 2px;
     border-style: solid;
     color: #fff;
     background-image: none;
     background-color: #000;
+    border-color: gray; }
+  switch:hover slider {
+    border-width: 2px;
+    border-style: solid;
+    color: #fff;
+    background-color: #000;
     border-color: gray;
-    box-shadow: inset 0 1px white, inset 0 -2px rgba(0, 0, 0, 0.6), inset 0 -1px #404040; }
-    switch slider:hover {
-      border-width: 2px;
-      border-style: solid;
-      color: #fff;
-      background-color: #000;
-      border-color: gray;
-      background-image: none;
-      box-shadow: inset 0 1px white, inset 0 -2px rgba(0, 0, 0, 0.6), inset 0 -1px #404040; }
-    switch slider:active {
-      border-color: #aaa; }
-    switch slider:disabled {
-      border-width: 2px;
-      border-style: solid;
-      color: gray;
-      background-color: #070707;
-      border-color: #494949;
-      background-image: none; }
-    switch slider:backdrop {
-      border-width: 2px;
-      border-style: solid;
-      color: #fff;
-      background-color: #000;
-      border-color: #737373;
-      background-image: none; }
-      switch slider:backdrop:active {
-        border-color: #737373; }
-      switch slider:backdrop:disabled {
-        border-width: 2px;
-        border-style: solid;
-        color: gray;
-        background-color: #070707;
-        border-color: #494949;
-        background-image: none; }
+    background-image: none; }
+  switch:active slider {
+    border: 2px solid #aaa; }
+  switch:disabled slider {
+    border-width: 2px;
+    border-style: solid;
+    color: gray;
+    background-color: #070707;
+    border-color: #494949;
+    background-image: none; }
+  switch:backdrop slider {
+    border-width: 2px;
+    border-style: solid;
+    color: #fff;
+    background-color: #000;
+    border-color: #737373;
+    background-image: none; }
+  switch:backdrop:active slider {
+    border-color: #aaa; }
+  switch:backdrop:disabled slider {
+    border-width: 2px;
+    border-style: solid;
+    color: gray;
+    background-color: #070707;
+    border-color: #494949;
+    background-image: none; }
 
 /*************************
  * Check and Radio items *
diff --git a/gtk/theme/HighContrast/gtk-contained.css b/gtk/theme/HighContrast/gtk-contained.css
index 53799b6..0707b65 100644
--- a/gtk/theme/HighContrast/gtk-contained.css
+++ b/gtk/theme/HighContrast/gtk-contained.css
@@ -2088,48 +2088,46 @@ switch {
     margin: -1px;
     min-width: 45px;
     min-height: 27px;
-    border: 1px solid;
+    border: 2px solid;
     border-radius: 3px;
     border-width: 2px;
     border-style: solid;
     color: #000;
     background-image: none;
     background-color: #fff;
+    border-color: gray; }
+  switch:hover slider {
+    border-width: 2px;
+    border-style: solid;
+    color: #000;
+    background-color: #fff;
     border-color: gray;
-    box-shadow: inset 0 1px white, inset 0 -2px rgba(255, 255, 255, 0.6), inset 0 -1px silver; }
-    switch slider:hover {
-      border-width: 2px;
-      border-style: solid;
-      color: #000;
-      background-color: #fff;
-      border-color: gray;
-      background-image: none;
-      box-shadow: inset 0 1px white, inset 0 -2px rgba(255, 255, 255, 0.6), inset 0 -1px silver; }
-    switch slider:active {
-      border-color: #000; }
-    switch slider:disabled {
-      border-width: 2px;
-      border-style: solid;
-      color: gray;
-      background-color: white;
-      border-color: silver;
-      background-image: none; }
-    switch slider:backdrop {
-      border-width: 2px;
-      border-style: solid;
-      color: #000;
-      background-color: #fff;
-      border-color: #8d8d8d;
-      background-image: none; }
-      switch slider:backdrop:active {
-        border-color: #8d8d8d; }
-      switch slider:backdrop:disabled {
-        border-width: 2px;
-        border-style: solid;
-        color: gray;
-        background-color: white;
-        border-color: silver;
-        background-image: none; }
+    background-image: none; }
+  switch:active slider {
+    border: 2px solid #000; }
+  switch:disabled slider {
+    border-width: 2px;
+    border-style: solid;
+    color: gray;
+    background-color: white;
+    border-color: silver;
+    background-image: none; }
+  switch:backdrop slider {
+    border-width: 2px;
+    border-style: solid;
+    color: #000;
+    background-color: #fff;
+    border-color: #8d8d8d;
+    background-image: none; }
+  switch:backdrop:active slider {
+    border-color: #000; }
+  switch:backdrop:disabled slider {
+    border-width: 2px;
+    border-style: solid;
+    color: gray;
+    background-color: white;
+    border-color: silver;
+    background-image: none; }
 
 /*************************
  * Check and Radio items *


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