[libadwaita/wip/exalm/backdrop: 19/24] stylesheet: Fix window shadows
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/backdrop: 19/24] stylesheet: Fix window shadows
- Date: Sun, 2 May 2021 10:23:36 +0000 (UTC)
commit ae3a96f2a936b6fc18b3eb11e3ebada7457f7801
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]