[gtk/wip/jimmac/window-shadows] Adwaita: non-linear shadows



commit b54aa76353d91a25a45b0ef9f553feda9b31357f
Author: Jakub Steiner <jimmac gmail com>
Date:   Wed Sep 26 18:55:43 2018 +0200

    Adwaita: non-linear shadows
    
    - For life-like shadows, with a non-linear falloff, we composite two
      shadows on top of each other.
    
    This is only [1/2] of a patch, as legacy windows need to be addressed
    with a more complicated patch for mutter.
    
    Addresses issue #1357

 gtk/theme/Adwaita/_common.scss           | 9 +++++----
 gtk/theme/Adwaita/gtk-contained-dark.css | 4 ++--
 gtk/theme/Adwaita/gtk-contained.css      | 4 ++--
 3 files changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index 5fd176598b..2180234aef 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -4358,7 +4358,8 @@ decoration {
   $_wm_border: if($variant=='light', transparentize(black, 0.77), transparentize($borders_color, 0.1));
   $_wm_border_backdrop: if($variant=='light', transparentize(black, 0.82), transparentize($borders_color, 
0.1));
 
-  box-shadow: 0 3px 9px 1px transparentize(black, 0.5),
+  box-shadow: 0 2px 5px 1px transparentize(black, 0.6),
+             0 2px 24px transparentize(black, 0.8),
               0 0 0 1px $_wm_border; //doing borders with box-shadow
 
   // FIXME rationalize shadows
@@ -4371,9 +4372,9 @@ decoration {
     // change when we go to backdrop, to prevent jumping windows.
     // The biggest shadow should be in the same order then in the active state
     // or the jumping will happen during the transition.
-    box-shadow: 0 3px 9px 1px transparent,
-                0 2px 6px 2px transparentize(black, 0.8),
-                0 0 0 1px $_wm_border_backdrop;
+    box-shadow: 0 2px 5px 1px transparent,
+             0 2px 24px transparent,
+              0 0 0 1px $_wm_border_backdrop; //doing borders with box-shadow
     transition: $backdrop_transition;
   }
 
diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css
index 4b362f5505..cbdb0e9a2c 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -1889,9 +1889,9 @@ colorchooser .popover.osd { border-radius: 5px; }
 .scale-popup button:hover { background-color: rgba(238, 238, 236, 0.1); border-radius: 5px; }
 
 /********************** Window Decorations * */
-decoration { border-radius: 7px 7px 0 0; border-width: 0px; box-shadow: 0 3px 9px 1px rgba(0, 0, 0, 0.5), 0 
0 0 1px rgba(27, 31, 32, 0.9); margin: 10px; }
+decoration { border-radius: 7px 7px 0 0; border-width: 0px; box-shadow: 0 2px 5px 1px rgba(0, 0, 0, 0.4), 0 
2px 24px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(27, 31, 32, 0.9); margin: 10px; }
 
-decoration:backdrop { box-shadow: 0 3px 9px 1px transparent, 0 2px 6px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px 
rgba(27, 31, 32, 0.9); transition: 200ms ease-out; }
+decoration:backdrop { box-shadow: 0 2px 5px 1px transparent, 0 2px 24px transparent, 0 0 0 1px rgba(27, 31, 
32, 0.9); transition: 200ms ease-out; }
 
 .maximized decoration, .fullscreen decoration, .tiled decoration, .tiled-top decoration, .tiled-left 
decoration, .tiled-right decoration, .tiled-bottom decoration { border-radius: 0; }
 
diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css
index 67aef82932..c47c96c0f4 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -1909,9 +1909,9 @@ colorchooser .popover.osd { border-radius: 5px; }
 .scale-popup button:hover { background-color: rgba(46, 52, 54, 0.1); border-radius: 5px; }
 
 /********************** Window Decorations * */
-decoration { border-radius: 7px 7px 0 0; border-width: 0px; box-shadow: 0 3px 9px 1px rgba(0, 0, 0, 0.5), 0 
0 0 1px rgba(0, 0, 0, 0.23); margin: 10px; }
+decoration { border-radius: 7px 7px 0 0; border-width: 0px; box-shadow: 0 2px 5px 1px rgba(0, 0, 0, 0.4), 0 
2px 24px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.23); margin: 10px; }
 
-decoration:backdrop { box-shadow: 0 3px 9px 1px transparent, 0 2px 6px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px 
rgba(0, 0, 0, 0.18); transition: 200ms ease-out; }
+decoration:backdrop { box-shadow: 0 2px 5px 1px transparent, 0 2px 24px transparent, 0 0 0 1px rgba(0, 0, 0, 
0.18); transition: 200ms ease-out; }
 
 .maximized decoration, .fullscreen decoration, .tiled decoration, .tiled-top decoration, .tiled-left 
decoration, .tiled-right decoration, .tiled-bottom decoration { border-radius: 0; }
 


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