[libadwaita/wip/exalm/hc-toolbar] stylesheet: Don't make toolbar buttons flat in HC




commit e3598264837d281d9135b208695fba35bce0bf8c
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Fri Mar 25 20:10:12 2022 +0400

    stylesheet: Don't make toolbar buttons flat in HC
    
    Buttons marked as .flat will still be completely flat, no way around that
    without breaking apps.
    
    Fixes https://gitlab.gnome.org/GNOME/libadwaita/-/issues/228

 src/stylesheet/widgets/_toolbars.scss | 34 ++++++++++++++++++++++++++++------
 1 file changed, 28 insertions(+), 6 deletions(-)
---
diff --git a/src/stylesheet/widgets/_toolbars.scss b/src/stylesheet/widgets/_toolbars.scss
index d2494362..d06a5bf1 100644
--- a/src/stylesheet/widgets/_toolbars.scss
+++ b/src/stylesheet/widgets/_toolbars.scss
@@ -1,9 +1,13 @@
 %toolbar {
-  button:not(.raised):not(.suggested-action):not(.destructive-action):not(.opaque) {
+  button:not(.flat):not(.raised):not(.suggested-action):not(.destructive-action):not(.opaque) {
     &.arrow-button,
     &.image-button,
     &.image-text-button {
       @extend %button_basic_flat;
+
+      @if $contrast == 'high' {
+        box-shadow: inset 0 0 0 1px $thin_border_color;
+      }
     }
   }
 
@@ -13,13 +17,17 @@
     }
   }
 
-  menubutton:not(.raised):not(.suggested-action):not(.destructive-action):not(.opaque) {
+  menubutton:not(.flat):not(.raised):not(.suggested-action):not(.destructive-action):not(.opaque) {
     &.image-button > button {
       @extend %button_basic_flat;
+
+      @if $contrast == 'high' {
+        box-shadow: inset 0 0 0 1px $thin_border_color;
+      }
     }
   }
 
-  .linked button:not(.raised):not(.suggested-action):not(.destructive-action):not(.opaque) {
+  .linked button:not(.flat):not(.raised):not(.suggested-action):not(.destructive-action):not(.opaque) {
     &.arrow-button,
     &.image-button,
     &.image-text-button {
@@ -27,7 +35,7 @@
     }
   }
 
-  menubutton.raised > button:not(.raised):not(.suggested-action):not(.destructive-action):not(.opaque) {
+  menubutton.raised > 
button:not(.flat):not(.raised):not(.suggested-action):not(.destructive-action):not(.opaque) {
     &.arrow-button,
     &.image-button,
     &.image-text-button {
@@ -38,7 +46,7 @@
   menubutton.suggested-action,
   menubutton.destructive-action,
   menubutton.opaque {
-    > button:not(.raised):not(.suggested-action):not(.destructive-action):not(.opaque) {
+    > button:not(.flat):not(.raised):not(.suggested-action):not(.destructive-action):not(.opaque) {
       @extend %opaque_button;
 
       color: inherit;
@@ -53,8 +61,12 @@
       margin-bottom: 6px;
     }
 
-    &:not(.raised):not(.suggested-action):not(.destructive-action):not(.opaque) {
+    &:not(.flat):not(.raised):not(.suggested-action):not(.destructive-action):not(.opaque) {
       @extend %flat_split_button;
+
+      @if $contrast == 'high' {
+        box-shadow: inset 0 0 0 1px $thin_border_color;
+      }
     }
   }
 
@@ -101,6 +113,16 @@
       }
     }
 
+    @if $contrast == 'high' {
+      button:not(.flat):not(.raised):not(.suggested-action):not(.destructive-action):not(.opaque) {
+        &.arrow-button,
+        &.image-button,
+        &.image-text-button {
+          box-shadow: none;
+        }
+      }
+    }
+
     entry,
     spinbutton,
     splitbutton,


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