[libadwaita/wip/exalm/recoloring-checks: 30/33] stylesheet: Make switch recoloring easier




commit affc49165f134696c97f3f8c081bf8b44237d8ef
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Fri Oct 22 13:03:40 2021 +0500

    stylesheet: Make switch recoloring easier
    
    Split checked hover/active states into background-image, like we already
    do for suggested action buttons.

 src/stylesheet/widgets/_switch.scss | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/stylesheet/widgets/_switch.scss b/src/stylesheet/widgets/_switch.scss
index d5355b78..b274a0ff 100644
--- a/src/stylesheet/widgets/_switch.scss
+++ b/src/stylesheet/widgets/_switch.scss
@@ -5,9 +5,9 @@ switch {
 
   transition: $focus_transition;
 
-   background-color: $trough_color;
+  background-color: $trough_color;
 
-   &:hover {
+  &:hover:not(:checked) {
     background-color: $trough_hover_color;
 
     &:active { background-color: $trough_active_color; }
@@ -42,9 +42,9 @@ switch {
     background-color: $fill_color;
 
     &:hover {
-      background-color: $fill_hover_color;
+      background-image: image(gtkalpha(currentColor, .1));
 
-      &:active { background-color: $fill_active_color; }
+      &:active { background-image: image(transparentize(black, .8)); }
     }
 
     > slider {


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