[libadwaita/wip/exalm/recoloring-checks: 1/4] stylesheet: Make switch recoloring easier




commit 25aa6e3d4f6560fad35bb8e5e7c369b074645c10
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 9fa02a0a..f3aaf8f4 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]