[libadwaita/wip/exalm/active: 4/4] stylesheet: Add missing :active styles




commit f172b3fb901f230af6e0ba054a707b85126b757e
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Tue May 24 13:48:52 2022 +0400

    stylesheet: Add missing :active styles
    
    :hover never happens on touch, so we can't rely solely on it.

 src/stylesheet/widgets/_expanders.scss | 3 ++-
 src/stylesheet/widgets/_notebook.scss  | 4 ++--
 src/stylesheet/widgets/_scale.scss     | 2 +-
 src/stylesheet/widgets/_switch.scss    | 3 ++-
 src/stylesheet/widgets/_trees.scss     | 2 +-
 5 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/src/stylesheet/widgets/_expanders.scss b/src/stylesheet/widgets/_expanders.scss
index fec19d2e..82ace679 100644
--- a/src/stylesheet/widgets/_expanders.scss
+++ b/src/stylesheet/widgets/_expanders.scss
@@ -20,7 +20,8 @@ expander-widget {
       opacity: .7;
     }
 
-    &:hover > expander {
+    &:hover > expander,
+    &:active > expander {
       opacity: 1;
     }
   }
diff --git a/src/stylesheet/widgets/_notebook.scss b/src/stylesheet/widgets/_notebook.scss
index d8f900fc..899812f3 100644
--- a/src/stylesheet/widgets/_notebook.scss
+++ b/src/stylesheet/widgets/_notebook.scss
@@ -124,7 +124,7 @@ notebook {
 
       font-weight: normal;
 
-      &:hover {
+      &:hover, &:active {
         background-color: $view_hover_color;
       }
 
@@ -143,7 +143,7 @@ notebook {
       // colors the button like the label, overridden otherwise
       button.flat {
         color: gtkalpha(currentColor, 0.3);
-        &:hover { color: currentColor; }
+        &:hover, &:active { color: currentColor; }
 
         padding: 0;
         margin-top: 4px;
diff --git a/src/stylesheet/widgets/_scale.scss b/src/stylesheet/widgets/_scale.scss
index 46d4d0fa..9a540bea 100644
--- a/src/stylesheet/widgets/_scale.scss
+++ b/src/stylesheet/widgets/_scale.scss
@@ -53,7 +53,7 @@ scale {
     }
   }
 
-  &:hover {
+  &:hover, &:active {
     > trough {
       background-color: $trough_hover_color;
 
diff --git a/src/stylesheet/widgets/_switch.scss b/src/stylesheet/widgets/_switch.scss
index 8654ffb4..3507bf25 100644
--- a/src/stylesheet/widgets/_switch.scss
+++ b/src/stylesheet/widgets/_switch.scss
@@ -30,7 +30,8 @@ switch {
     }
   }
 
-  &:hover > slider {
+  &:hover > slider,
+  &:active > slider {
     background: $slider_hover_color;
   }
 
diff --git a/src/stylesheet/widgets/_trees.scss b/src/stylesheet/widgets/_trees.scss
index 8b137968..a43a8a43 100644
--- a/src/stylesheet/widgets/_trees.scss
+++ b/src/stylesheet/widgets/_trees.scss
@@ -46,7 +46,7 @@ treeview.view {
 
     color: gtkalpha(currentColor, .7);
 
-    &:hover { color: currentColor; }
+    &:hover, &:active { color: currentColor; }
 
     &:checked { -gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); }
 


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