[gtk: 1/4] Adwaita: Drop the background of nested headerbars



commit a121bfa7ec2878e1eda3df268099741cf6dbdb77
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Fri Sep 7 13:04:59 2018 +0200

    Adwaita: Drop the background of nested headerbars
    
    This is needed to work around headerbar sliding animation issues without
    refactoring Adwaita's support of titlebars and headerbars as it may
    break applications.
    
    https://gitlab.gnome.org/GNOME/gtk/issues/1264

 gtk/theme/Adwaita/_common.scss           | 10 ++++++++++
 gtk/theme/Adwaita/gtk-contained-dark.css |  2 ++
 gtk/theme/Adwaita/gtk-contained.css      |  2 ++
 3 files changed, 14 insertions(+)
---
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index 15a228e0b6..2031b79906 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -1652,6 +1652,16 @@ headerbar {
     margin-top: 9px;
     margin-bottom: 9px;
   }
+
+  &.titlebar headerbar:not(.titlebar) {
+    // Drop the background of non-titlebar nested headerbars. This is needed to
+    // work around headerbar sliding animation issues without refactoring
+    // Adwaita's support of titlebars and headerbars as it may break
+    // applications.
+    // See https://gitlab.gnome.org/GNOME/gtk/issues/1264 for more information.
+    background: none;
+    box-shadow: none;
+  }
 }
 
 .background:not(.tiled):not(.maximized):not(.solid-csd) .titlebar,
diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css
index 506cfa02b4..c250eb223a 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -674,6 +674,8 @@ headerbar entry, headerbar spinbutton, headerbar separator, headerbar button { m
 
 headerbar switch { margin-top: 9px; margin-bottom: 9px; }
 
+headerbar.titlebar headerbar:not(.titlebar) { background: none; box-shadow: none; }
+
 .background:not(.tiled):not(.maximized):not(.solid-csd) .titlebar:backdrop, 
.background:not(.tiled):not(.maximized):not(.solid-csd) .titlebar, 
.background:not(.tiled-top):not(.maximized):not(.solid-csd) .titlebar:backdrop, 
.background:not(.tiled-top):not(.maximized):not(.solid-csd) .titlebar, 
.background:not(.tiled-left):not(.maximized):not(.solid-csd) .titlebar:backdrop, 
.background:not(.tiled-left):not(.maximized):not(.solid-csd) .titlebar, 
.background:not(.tiled-right):not(.maximized):not(.solid-csd) .titlebar:backdrop, 
.background:not(.tiled-right):not(.maximized):not(.solid-csd) .titlebar, 
.background:not(.tiled-bottom):not(.maximized):not(.solid-csd) .titlebar:backdrop, 
.background:not(.tiled-bottom):not(.maximized):not(.solid-csd) .titlebar { border-top-left-radius: 7px; 
border-top-right-radius: 7px; }
 
 window:not(.tiled):not(.maximized):not(.fullscreen):not(.solid-csd) separator:first-child + 
headerbar:backdrop, window:not(.tiled):not(.maximized):not(.fullscreen):not(.solid-csd) separator:first-child 
+ headerbar, window:not(.tiled):not(.maximized):not(.fullscreen):not(.solid-csd) 
headerbar:first-child:backdrop, window:not(.tiled):not(.maximized):not(.fullscreen):not(.solid-csd) 
headerbar:first-child { border-top-left-radius: 7px; }
diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css
index 646e7b9622..2ee69b8d8d 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -682,6 +682,8 @@ headerbar entry, headerbar spinbutton, headerbar separator, headerbar button { m
 
 headerbar switch { margin-top: 9px; margin-bottom: 9px; }
 
+headerbar.titlebar headerbar:not(.titlebar) { background: none; box-shadow: none; }
+
 .background:not(.tiled):not(.maximized):not(.solid-csd) .titlebar:backdrop, 
.background:not(.tiled):not(.maximized):not(.solid-csd) .titlebar, 
.background:not(.tiled-top):not(.maximized):not(.solid-csd) .titlebar:backdrop, 
.background:not(.tiled-top):not(.maximized):not(.solid-csd) .titlebar, 
.background:not(.tiled-left):not(.maximized):not(.solid-csd) .titlebar:backdrop, 
.background:not(.tiled-left):not(.maximized):not(.solid-csd) .titlebar, 
.background:not(.tiled-right):not(.maximized):not(.solid-csd) .titlebar:backdrop, 
.background:not(.tiled-right):not(.maximized):not(.solid-csd) .titlebar, 
.background:not(.tiled-bottom):not(.maximized):not(.solid-csd) .titlebar:backdrop, 
.background:not(.tiled-bottom):not(.maximized):not(.solid-csd) .titlebar { border-top-left-radius: 7px; 
border-top-right-radius: 7px; }
 
 window:not(.tiled):not(.maximized):not(.fullscreen):not(.solid-csd) separator:first-child + 
headerbar:backdrop, window:not(.tiled):not(.maximized):not(.fullscreen):not(.solid-csd) separator:first-child 
+ headerbar, window:not(.tiled):not(.maximized):not(.fullscreen):not(.solid-csd) 
headerbar:first-child:backdrop, window:not(.tiled):not(.maximized):not(.fullscreen):not(.solid-csd) 
headerbar:first-child { border-top-left-radius: 7px; }


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