[gtk+/gtk-3-20] Adwaita: more flexible headerbar_fill mixin
- From: Lapo Calamandrei <lapo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-20] Adwaita: more flexible headerbar_fill mixin
- Date: Thu, 5 May 2016 16:59:29 +0000 (UTC)
commit 7dbe3d953dfdeea6482f21b7e1ab20a762d34c01
Author: Lapo Calamandrei <calamandrei gmail com>
Date: Thu May 5 18:07:55 2016 +0200
Adwaita: more flexible headerbar_fill mixin
adding 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 206387e..6975dcf 100644
--- a/gtk/theme/Adwaita/_drawing.scss
+++ b/gtk/theme/Adwaita/_drawing.scss
@@ -506,18 +506,21 @@
@else { box-shadow: none; }
}
- 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 0c4215e..36c393c 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -1662,8 +1662,7 @@ headerbar {
border-style: solid;
border-color: #1c1f1f;
border-radius: 0;
- background-image: linear-gradient(to top, #2a2f2f, #2f3434 2px, #323737 3px);
- background-color: #323737;
+ background: #323737 linear-gradient(to top, #2a2f2f, #2f3434 2px, #323737 3px);
box-shadow: inset 0 1px rgba(238, 238, 236, 0.07); }
.titlebar:backdrop:not(headerbar),
headerbar:backdrop {
@@ -1687,8 +1686,7 @@ headerbar {
color: #ffffff;
text-shadow: 0 -1px rgba(0, 0, 0, 0.5);
border-color: #0f2b48;
- 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 52f72d6..28c4487 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -1669,8 +1669,7 @@ headerbar {
border-style: solid;
border-color: #9d9d99;
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 {
@@ -1694,8 +1693,7 @@ headerbar {
color: #ffffff;
text-shadow: 0 -1px rgba(0, 0, 0, 0.5);
border-color: #184472;
- 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]