[libadwaita/wip/exalm/active-11: 2/3] stylesheet: Add missing :active styles




commit e9fa0676de1f547035b37fc98cd5341391fffd8d
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Tue May 24 05:42:19 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/_tab-view.scss  | 4 ++--
 src/stylesheet/widgets/_trees.scss     | 2 +-
 6 files changed, 10 insertions(+), 8 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 6c21a55f..02bcc896 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/_tab-view.scss b/src/stylesheet/widgets/_tab-view.scss
index 551e1d14..a414a6dd 100644
--- a/src/stylesheet/widgets/_tab-view.scss
+++ b/src/stylesheet/widgets/_tab-view.scss
@@ -88,14 +88,14 @@ tabbar {
       background-color: transparent;
     }
 
-    &:hover {
+    &:hover, &:active {
       background-image: image(gtkalpha(currentColor, .03));
     }
 
     &.needs-attention {
       background-image: $tab_needs_attention_gradient;
 
-      &:hover {
+      &:hover, &:active {
         background-image: image(gtkalpha(currentColor, .03)), $tab_needs_attention_gradient;
       }
     }
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]