[gtk/gtk-3-24: 1/2] Adwaita: Drop the background of nested headerbars



commit f0696dfae03ba070f5436877e321f0392596a5b5
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           | 11 +++++++++++
 gtk/theme/Adwaita/gtk-contained-dark.css |  2 ++
 gtk/theme/Adwaita/gtk-contained.css      |  2 ++
 3 files changed, 15 insertions(+)
---
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index 44cc7c1cf6..05a4999a97 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -1657,6 +1657,17 @@ headerbar {
       }
     }
   }
+
+  &.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-color: rgba (0, 0, 0, 0);
+    background-image: none;
+    box-shadow: none;
+  }
 }
 
 headerbar {
diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css
index d162188c16..4b21a8f64c 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -660,6 +660,8 @@ searchbar > revealer > box { margin: -6px; padding: 6px; }
 
 .solid-csd .titlebar:backdrop:dir(rtl):not(headerbar), .solid-csd 
.titlebar:backdrop:dir(ltr):not(headerbar), .solid-csd .titlebar:dir(rtl):not(headerbar), .solid-csd 
.titlebar:dir(ltr):not(headerbar), .solid-csd headerbar:backdrop:dir(rtl), .solid-csd 
headerbar:backdrop:dir(ltr), .solid-csd headerbar:dir(rtl), .solid-csd headerbar:dir(ltr) { margin-left: 
-1px; margin-right: -1px; margin-top: -1px; border-radius: 0; box-shadow: none; }
 
+.titlebar:not(headerbar) headerbar:not(.titlebar), headerbar.titlebar headerbar:not(.titlebar) { 
background-color: rgba 0, 0, 0, 0; background-image: none; box-shadow: none; }
+
 headerbar entry, headerbar spinbutton, headerbar separator, headerbar button { margin-top: 6px; 
margin-bottom: 6px; }
 
 headerbar switch { margin-top: 9px; margin-bottom: 9px; }
diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css
index e4e2ed5be8..6858a38635 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -668,6 +668,8 @@ searchbar > revealer > box { margin: -6px; padding: 6px; }
 
 .solid-csd .titlebar:backdrop:dir(rtl):not(headerbar), .solid-csd 
.titlebar:backdrop:dir(ltr):not(headerbar), .solid-csd .titlebar:dir(rtl):not(headerbar), .solid-csd 
.titlebar:dir(ltr):not(headerbar), .solid-csd headerbar:backdrop:dir(rtl), .solid-csd 
headerbar:backdrop:dir(ltr), .solid-csd headerbar:dir(rtl), .solid-csd headerbar:dir(ltr) { margin-left: 
-1px; margin-right: -1px; margin-top: -1px; border-radius: 0; box-shadow: none; }
 
+.titlebar:not(headerbar) headerbar:not(.titlebar), headerbar.titlebar headerbar:not(.titlebar) { 
background-color: rgba 0, 0, 0, 0; background-image: none; box-shadow: none; }
+
 headerbar entry, headerbar spinbutton, headerbar separator, headerbar button { margin-top: 6px; 
margin-bottom: 6px; }
 
 headerbar switch { margin-top: 9px; margin-bottom: 9px; }


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