[gtk+] Adwaita: fix bogus rounded corners on split headerbars
- From: Lapo Calamandrei <lapo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Adwaita: fix bogus rounded corners on split headerbars
- Date: Tue, 22 Dec 2015 10:56:12 +0000 (UTC)
commit a64bf81a9fdfbfeabe13298becd5e14fd3dfdd8c
Author: Lapo Calamandrei <calamandrei gmail com>
Date: Tue Dec 22 11:53:27 2015 +0100
Adwaita: fix bogus rounded corners on split headerbars
we have to do some assumptions for css selectors limits for this
particular case, so for split headerbars to work correctly the
actual haderbars need not to have the titlebar class applied.
gtk/theme/Adwaita/_common.scss | 20 ++++++++++++++++++--
gtk/theme/Adwaita/gtk-contained-dark.css | 17 ++++++++++++++---
gtk/theme/Adwaita/gtk-contained.css | 17 ++++++++++++++---
3 files changed, 46 insertions(+), 8 deletions(-)
---
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index fd40259..de2f23e 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -1086,7 +1086,8 @@ headerbar {
border-width: 0 0 1px;
border-style: solid;
border-color: $borders_color;
- border-radius: 7px 7px 0 0;
+ border-radius: 0;
+
background-color: transparent;
@include headerbar_fill;
@@ -1254,13 +1255,28 @@ headerbar {
}
}
+.titlebar {
+ &, &:backdrop {
+ border-top-left-radius: 7px;
+ border-top-right-radius: 7px;
+ }
+}
+
+headerbar {
+ separator:first-child + &, // tackles the paned container case
+ &:first-child { &, &:backdrop { border-top-left-radius: 7px; }}
+ &:last-child { &, &:backdrop { border-top-right-radius: 7px; }}
+}
+
.titlebar:not(headerbar) {
window.csd > & {
// in csd we assume every titlebar is a headerbar so reset anything, this is needed for split toolbars
cases
padding: 0;
- border-style: none;
+ background-color: transparent;
background-image: none;
+ border-style: none;
border-color: transparent;
+ box-shadow: none;
}
@extend %titlebar;
}
diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css
index b410f87..13a7b10 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -1605,7 +1605,7 @@ headerbar {
border-width: 0 0 1px;
border-style: solid;
border-color: #1c1f1f;
- border-radius: 7px 7px 0 0;
+ border-radius: 0;
background-color: transparent;
background-image: linear-gradient(to top, #2a2f2f, #2f3434 2px, #323737 3px);
box-shadow: inset 0 1px rgba(238, 238, 236, 0.07); }
@@ -1927,11 +1927,22 @@ headerbar {
.titlebar headerbar.default-decoration button.titlebutton {
padding: 5px; }
+.titlebar, .titlebar:backdrop {
+ border-top-left-radius: 7px;
+ border-top-right-radius: 7px; }
+
+separator:first-child + headerbar, separator:first-child + headerbar:backdrop, headerbar:first-child,
headerbar:first-child:backdrop {
+ border-top-left-radius: 7px; }
+headerbar:last-child, headerbar:last-child:backdrop {
+ border-top-right-radius: 7px; }
+
window.csd > .titlebar:not(headerbar) {
padding: 0;
- border-style: none;
+ background-color: transparent;
background-image: none;
- border-color: transparent; }
+ border-style: none;
+ border-color: transparent;
+ box-shadow: none; }
/************
* Pathbars *
diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css
index 4621e91..fc1734a 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -1605,7 +1605,7 @@ headerbar {
border-width: 0 0 1px;
border-style: solid;
border-color: #9d9d99;
- border-radius: 7px 7px 0 0;
+ border-radius: 0;
background-color: transparent;
background-image: linear-gradient(to top, #d4d4d2, #efefef 2px, #f4f4f4 3px);
box-shadow: inset 0 1px rgba(255, 255, 255, 0.8); }
@@ -1927,11 +1927,22 @@ headerbar {
.titlebar headerbar.default-decoration button.titlebutton {
padding: 5px; }
+.titlebar, .titlebar:backdrop {
+ border-top-left-radius: 7px;
+ border-top-right-radius: 7px; }
+
+separator:first-child + headerbar, separator:first-child + headerbar:backdrop, headerbar:first-child,
headerbar:first-child:backdrop {
+ border-top-left-radius: 7px; }
+headerbar:last-child, headerbar:last-child:backdrop {
+ border-top-right-radius: 7px; }
+
window.csd > .titlebar:not(headerbar) {
padding: 0;
- border-style: none;
+ background-color: transparent;
background-image: none;
- border-color: transparent; }
+ border-style: none;
+ border-color: transparent;
+ box-shadow: none; }
/************
* Pathbars *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]