[libadwaita/wip/exalm/backdrop] stylesheet: Fix window shadows



commit 42ebc3186ecaaa9aad40f11ac1aaf6913efbef05
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Fri Apr 30 17:28:46 2021 +0500

    stylesheet: Fix window shadows
    
    There were a number of issues with window shadows:
    
    * Maximized and fullscreen windows had the same hairline shadow as tiled
      windows because the tiled window rule comes after it and they have
      .tiled-left etc style classes.
    
    * Tiled windows have a regular shadow in backdrop state
    
    * Both of them can be applied to windows without .csd, unlike regular
      shadows.

 src/stylesheet/widgets/_window.scss | 48 +++++++++++++++++++------------------
 1 file changed, 25 insertions(+), 23 deletions(-)
---
diff --git a/src/stylesheet/widgets/_window.scss b/src/stylesheet/widgets/_window.scss
index e76a53e..62f559e 100644
--- a/src/stylesheet/widgets/_window.scss
+++ b/src/stylesheet/widgets/_window.scss
@@ -35,6 +35,31 @@ window {
       box-shadow: 0 1px 2px transparentize(black, 0.8),
                   0 0 0 1px transparentize($_wm_border, 0.1);
     }
+
+    &.tiled,
+    &.tiled-top,
+    &.tiled-left,
+    &.tiled-right,
+    &.tiled-bottom {
+      border-radius: 0;
+      outline: none;
+
+      box-shadow: 0 0 0 1px $_wm_border,
+                  0 0 0 20px transparent; //transparent control workaround -- #3670
+
+      &:backdrop {
+        box-shadow: 0 0 0 1px $_wm_border_backdrop,
+                    0 0 0 20px transparent;
+      }
+    }
+
+    &.maximized,
+    &.fullscreen {
+      border-radius: 0;
+      outline: none;
+      box-shadow: none;
+      transition: none;
+    }
   }
 
   &.solid-csd {
@@ -47,29 +72,6 @@ window {
     &:backdrop { box-shadow: inset 0 0 0 4px $borders_color, inset 0 0 0 3px $bg_color; }
   }
 
-  &.maximized,
-  &.fullscreen {
-    border-radius: 0;
-    box-shadow: none;
-    outline: none;
-  }
-
-  &.tiled,
-  &.tiled-top,
-  &.tiled-left,
-  &.tiled-right,
-  &.tiled-bottom {
-    border-radius: 0;
-    box-shadow: 0 0 0 1px $_wm_border_backdrop,
-                0 0 0 20px transparent; //transparent control workaround -- #3670
-    outline: none;
-  }
-
-  &:backdrop {
-    box-shadow: 0 0 0 1px $_wm_border_backdrop,
-                0 0 0 20px transparent; // #3670
-  }
-
   // server-side decorations as used by mutter
   &.ssd { box-shadow: 0 0 0 1px $_wm_border; } //just doing borders, wm draws actual shadows
 }


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