[gtk+] Adwaita: correctly order backdrop decoration node shadows



commit 5a0aeec3f475b790e3de19dd2c68e1ded9c9d8c5
Author: Lapo Calamandrei <calamandrei gmail com>
Date:   Sat Mar 19 17:08:17 2016 +0100

    Adwaita: correctly order backdrop decoration node shadows
    
    ... otherwise setting a transition to the backdrop state will make
    the window resize, since the shadows size gets interpolated.

 gtk/theme/Adwaita/_common.scss           |   13 +++++++------
 gtk/theme/Adwaita/gtk-contained-dark.css |    6 +-----
 gtk/theme/Adwaita/gtk-contained.css      |    6 +-----
 3 files changed, 9 insertions(+), 16 deletions(-)
---
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index 72c07e2..d7db690 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -4030,15 +4030,16 @@ decoration {
 
   // FIXME rationalize shadows
 
-  /* this is used for the resize cursor area */
+  // this is used for the resize cursor area
   margin: 10px;
 
   &:backdrop {
-    /* the transparent shadow here is to enforce that the shadow extents don't
-     * change when we go to backdrop, to prevent jumping windows
-     */
-    box-shadow: 0 2px 6px 2px transparentize(black, 0.8),
-                0 3px 9px 1px transparent,
+    // the transparent shadow here is to enforce that the shadow extents don't
+    // 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;
   }
 
diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css
index 33b5259..f082b9f 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -4013,13 +4013,9 @@ 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(28, 31, 31, 0.9);
-  /* this is used for the resize cursor area */
   margin: 10px; }
   decoration:backdrop {
-    /* the transparent shadow here is to enforce that the shadow extents don't
-     * change when we go to backdrop, to prevent jumping windows
-     */
-    box-shadow: 0 2px 6px 2px rgba(0, 0, 0, 0.2), 0 3px 9px 1px transparent, 0 0 0 1px rgba(28, 31, 31, 
0.9); }
+    box-shadow: 0 3px 9px 1px transparent, 0 2px 6px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(28, 31, 31, 
0.9); }
   .fullscreen decoration, .tiled decoration {
     border-radius: 0; }
   .popup decoration {
diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css
index 1eafe37..65f4dea 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -4041,13 +4041,9 @@ 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);
-  /* this is used for the resize cursor area */
   margin: 10px; }
   decoration:backdrop {
-    /* the transparent shadow here is to enforce that the shadow extents don't
-     * change when we go to backdrop, to prevent jumping windows
-     */
-    box-shadow: 0 2px 6px 2px rgba(0, 0, 0, 0.2), 0 3px 9px 1px transparent, 0 0 0 1px rgba(0, 0, 0, 0.18); }
+    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); }
   .fullscreen decoration, .tiled decoration {
     border-radius: 0; }
   .popup decoration {


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