[gtk: 1/3] Adwaita: Limit color swatch's hover effect to .activatable




commit 51d6ec5131992a5e7cf763d117174f83be38a5cc
Author: nana-4 <hnmaigo gmail com>
Date:   Sat Aug 8 08:33:38 2020 +0900

    Adwaita: Limit color swatch's hover effect to .activatable
    
    Non-activatable color swatches shouldn't have the interactive effect.

 gtk/theme/Adwaita/_common.scss | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index 15e2dd6e46..c453733828 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -3641,24 +3641,22 @@ colorswatch {
   }
 
   &.dark {
-
-
     > overlay {
       color: white;
+    }
 
-      &:hover { border-color: if($variant == 'light', transparentize(black, 0.2), $borders_color); }
-
+    &.activatable:hover > overlay {
+      border-color: if($variant == 'light', transparentize(black, 0.2), $borders_color);
     }
   }
 
   &.light {
-
-
     > overlay {
       color: black;
+    }
 
-      &:hover { border-color: if($variant == 'light', transparentize(black, 0.5), $borders_color); }
-
+    &.activatable:hover > overlay {
+      border-color: if($variant == 'light', transparentize(black, 0.5), $borders_color);
     }
   }
 
@@ -3680,11 +3678,11 @@ colorswatch {
 
   > overlay {
     border: 1px solid if($variant == 'light', transparentize(black, 0.7), $borders_color);
+  }
 
-    &:hover {
-      box-shadow: inset 0 1px transparentize(white, 0.6),
-                  inset 0 -1px transparentize(black, 0.8);
-    }
+  &.activatable:hover > overlay {
+    box-shadow: inset 0 1px transparentize(white, 0.6),
+                inset 0 -1px transparentize(black, 0.8);
   }
 
   &#add-color-button {
@@ -3694,8 +3692,10 @@ colorswatch {
 
     > overlay {
       @include button(normal);
+    }
 
-      &:hover { @include button(hover); }
+    &.activatable:hover > overlay {
+      @include button(hover);
     }
   }
 


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