From a47a3fbd3b9c71e35d45e5fd5b81e702a7dbebab Mon Sep 17 00:00:00 2001 From: Lapo Calamandrei Date: Thu, 3 Nov 2016 18:52:54 +0100 Subject: [PATCH] Adwaita: correctly style headerbars in a stack corners are correctly rounded now. Stacked splitted headerbars are not supported yet though. --- gtk/theme/Adwaita/_common.scss | 11 +++++++++-- gtk/theme/Adwaita/gtk-contained-dark.css | 3 +++ gtk/theme/Adwaita/gtk-contained.css | 3 +++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss index eb9f202fd5..8ed55688eb 100644 --- a/gtk/theme/Adwaita/_common.scss +++ b/gtk/theme/Adwaita/_common.scss @@ -1569,11 +1569,18 @@ headerbar { } } -headerbar { +headerbar { // headerbar border rounding window:not(.tiled):not(.maximized):not(.solid-csd) separator:first-child + &, // tackles the paned container case window:not(.tiled):not(.maximized):not(.solid-csd) &:first-child { &:backdrop, & { border-top-left-radius: 7px; }} - window:not(.tiled):not(.maximized):not(.solid-csd) &:last-child { &:backdrop, & { border-top-right-radius: 7px; }} + window:not(.tiled):not(.maximized):not(.solid-csd) stack & { // tackles the stacked headerbars case + &:first-child, &:last-child { + &:backdrop, & { + border-top-left-radius: 7px; + border-top-right-radius: 7px; + } + } + } } .titlebar:not(headerbar) { diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css index 3ee66f4558..660416831e 100644 --- a/gtk/theme/Adwaita/gtk-contained-dark.css +++ b/gtk/theme/Adwaita/gtk-contained-dark.css @@ -2022,6 +2022,9 @@ window:not(.tiled):not(.maximized):not(.solid-csd) separator:first-child + heade border-top-left-radius: 7px; } window:not(.tiled):not(.maximized):not(.solid-csd) headerbar:last-child:backdrop, window:not(.tiled):not(.maximized):not(.solid-csd) headerbar:last-child { border-top-right-radius: 7px; } +window:not(.tiled):not(.maximized):not(.solid-csd) stack headerbar:first-child:backdrop, window:not(.tiled):not(.maximized):not(.solid-csd) stack headerbar:first-child, window:not(.tiled):not(.maximized):not(.solid-csd) stack headerbar:last-child:backdrop, window:not(.tiled):not(.maximized):not(.solid-csd) stack headerbar:last-child { + border-top-left-radius: 7px; + border-top-right-radius: 7px; } window.csd > .titlebar:not(headerbar) { padding: 0; diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css index 9e6ff672e0..2752d2f505 100644 --- a/gtk/theme/Adwaita/gtk-contained.css +++ b/gtk/theme/Adwaita/gtk-contained.css @@ -2031,6 +2031,9 @@ window:not(.tiled):not(.maximized):not(.solid-csd) separator:first-child + heade border-top-left-radius: 7px; } window:not(.tiled):not(.maximized):not(.solid-csd) headerbar:last-child:backdrop, window:not(.tiled):not(.maximized):not(.solid-csd) headerbar:last-child { border-top-right-radius: 7px; } +window:not(.tiled):not(.maximized):not(.solid-csd) stack headerbar:first-child:backdrop, window:not(.tiled):not(.maximized):not(.solid-csd) stack headerbar:first-child, window:not(.tiled):not(.maximized):not(.solid-csd) stack headerbar:last-child:backdrop, window:not(.tiled):not(.maximized):not(.solid-csd) stack headerbar:last-child { + border-top-left-radius: 7px; + border-top-right-radius: 7px; } window.csd > .titlebar:not(headerbar) { padding: 0;