[gtk+] Adwaita: more flexible headerbar_fill mixin
- From: Lapo Calamandrei <lapo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Adwaita: more flexible headerbar_fill mixin
- Date: Thu, 5 May 2016 16:59:12 +0000 (UTC)
commit 870a674283d9b59795c61ce24e713cde0a7fb7dc
Author: Lapo Calamandrei <calamandrei gmail com>
Date: Thu May 5 18:36:03 2016 +0200
Adwaita: more flexible headerbar_fill mixin
add an additional background layer as a parameter.
gtk/theme/Adwaita/_drawing.scss | 11 +++++++----
gtk/theme/Adwaita/gtk-contained-dark.css | 6 ++----
gtk/theme/Adwaita/gtk-contained.css | 6 ++----
3 files changed, 11 insertions(+), 12 deletions(-)
---
diff --git a/gtk/theme/Adwaita/_drawing.scss b/gtk/theme/Adwaita/_drawing.scss
index b6a302d..a48a789 100644
--- a/gtk/theme/Adwaita/_drawing.scss
+++ b/gtk/theme/Adwaita/_drawing.scss
@@ -475,18 +475,21 @@
}
}
- mixin headerbar_fill($c:$headerbar_color, $hc:$top_hilight) {
+ mixin headerbar_fill($c:$headerbar_color, $hc:$top_hilight, $ov: none) {
//
// headerbar fill
//
// $c: base color
// $hc: top highlight color
+// $ov: a background layer for background shorthand (hence no commas!)
//
+ $gradient: linear-gradient(to top, darken($c, 13%), darken($c, 2%) 2px, $c 3px);
- @if $variant == 'light' { background-image: linear-gradient(to top, darken($c, 13%), darken($c, 2%) 2px,
$c 3px); }
- @else { background-image: linear-gradient(to top, darken($c, 3%), darken($c, 1%) 2px, $c 3px); }
+ @if $variant == 'dark' { $gradient: linear-gradient(to top, darken($c, 3%), darken($c, 1%) 2px, $c 3px); }
+
+ @if $ov != none { background: $c $ov, $gradient; }
+ @else { background: $c $gradient; }
- background-color: $c;
box-shadow: inset 0 1px $hc; // top highlight
}
diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css
index 0bf0b90..9d256e4 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -1773,8 +1773,7 @@ headerbar {
border-style: solid;
border-color: #0b0c0c;
border-radius: 0;
- background-image: linear-gradient(to top, #25292b, #2a2e30 2px, #2c3133 3px);
- background-color: #2c3133;
+ background: #2c3133 linear-gradient(to top, #25292b, #2a2e30 2px, #2c3133 3px);
box-shadow: inset 0 1px rgba(238, 238, 236, 0.07); }
.titlebar:backdrop:not(headerbar),
headerbar:backdrop {
@@ -1798,8 +1797,7 @@ headerbar {
color: #ffffff;
border-color: #0f2b48;
text-shadow: 0 -1px rgba(0, 0, 0, 0.5);
- background-image: linear-gradient(to top, #1e5690, #205b98 2px, #215d9c 3px);
- background-color: #215d9c;
+ background: #215d9c linear-gradient(to top, #1e5690, #205b98 2px, #215d9c 3px);
box-shadow: inset 0 1px rgba(40, 98, 159, 0.535); }
.selection-mode.titlebar:backdrop:not(headerbar),
headerbar.selection-mode:backdrop {
diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css
index 2328c36..bc43cf1 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -1780,8 +1780,7 @@ headerbar {
border-style: solid;
border-color: #91918c;
border-radius: 0;
- background-image: linear-gradient(to top, #d4d4d2, #efefef 2px, #f4f4f4 3px);
- background-color: #f4f4f4;
+ background: #f4f4f4 linear-gradient(to top, #d4d4d2, #efefef 2px, #f4f4f4 3px);
box-shadow: inset 0 1px rgba(255, 255, 255, 0.8); }
.titlebar:backdrop:not(headerbar),
headerbar:backdrop {
@@ -1805,8 +1804,7 @@ headerbar {
color: #ffffff;
border-color: #184472;
text-shadow: 0 -1px rgba(0, 0, 0, 0.5);
- background-image: linear-gradient(to top, #276fba, #428bd7 2px, #4a90d9 3px);
- background-color: #4a90d9;
+ background: #4a90d9 linear-gradient(to top, #276fba, #428bd7 2px, #4a90d9 3px);
box-shadow: inset 0 1px rgba(146, 188, 232, 0.9); }
.selection-mode.titlebar:backdrop:not(headerbar),
headerbar.selection-mode:backdrop {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]