[libadwaita/wip/exalm/background-colors: 36/48] stylesheet: Refactor .content row colors




commit d65149506a6bf5687a47ae74b67d58a648c3e789
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Wed Sep 1 14:16:25 2021 +0500

    stylesheet: Refactor .content row colors
    
    Fix non-activatable rows having a pressed state in process.

 src/stylesheet/widgets/_lists.scss | 55 ++++++++++++++++++++++----------------
 1 file changed, 32 insertions(+), 23 deletions(-)
---
diff --git a/src/stylesheet/widgets/_lists.scss b/src/stylesheet/widgets/_lists.scss
index 123fb996..8828808a 100644
--- a/src/stylesheet/widgets/_lists.scss
+++ b/src/stylesheet/widgets/_lists.scss
@@ -224,33 +224,42 @@ listview.content {
     background-color: transparent;
   }
 
-  // Nested rows background
-  list.nested > row:not(:active) {
-    &:not(:hover):not(:selected),
-    &:hover:not(.activatable):not(:selected) {
-      background-color: mix($bg_color, $base_color, 50%);
-    }
+  > row {
+    &:not(:selected) {
+      // Regular rows and expander header rows background
+      &, &.expander row.header {
+        background-color: $base_color;
+
+        &.activatable {
+          &.has-open-popup,
+          &:hover {
+            background-color: mix($fg_color, $base_color, 5%);
+          }
+
+          &:active {
+            background-color: mix($fg_color, $base_color, 10%);
+          }
+        }
+      }
 
-    &:hover.activatable:not(:selected) {
-      background-color: mix($fg_color, $base_color, 5%);
-    }
-  }
+      &.expander {
+        background: none;
 
-  > row {
-    // Regular rows and expander header rows background
-    &:not(.expander):not(:active):not(:hover):not(:selected),
-    &:not(.expander):not(:active):hover:not(.activatable):not(:selected),
-    &.expander row.header:not(:active):not(:hover):not(:selected),
-    &.expander row.header:not(:active):hover:not(.activatable):not(:selected) {
-      background-color: $base_color;
-    }
+        // Nested rows background
+        list.nested > row:not(:selected) {
+          background-color: mix($bg_color, $base_color, 50%);
 
-    &:not(.expander):hover.activatable:not(:selected),
-    &.expander row.header:hover.activatable:not(:selected) {
-      background-color: mix($fg_color, $base_color, 5%);
+          &.activatable {
+            &.has-open-popup,
+            &:hover {
+              background-color: mix($fg_color, $base_color, 5%);
+            }
 
-      &:active {
-        background-color: mix($fg_color, $base_color, 10%);
+            &:active {
+              background-color: mix($fg_color, $base_color, 10%);
+            }
+          }
+        }
       }
     }
 


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