summaryrefslogtreecommitdiff
path: root/gtk/theme
diff options
context:
space:
mode:
authorLapo Calamandrei <calamandrei@gmail.com>2016-05-05 18:36:03 +0200
committerLapo Calamandrei <calamandrei@gmail.com>2016-05-05 18:36:03 +0200
commit870a674283d9b59795c61ce24e713cde0a7fb7dc (patch)
treed80afc464393119734fcbc57b469248274775ea4 /gtk/theme
parent27c1cce726934f20d1f0cb962f658938ab34eb47 (diff)
downloadgtk+-870a674283d9b59795c61ce24e713cde0a7fb7dc.tar.gz
Adwaita: more flexible headerbar_fill mixin
add an additional background layer as a parameter.
Diffstat (limited to 'gtk/theme')
-rw-r--r--gtk/theme/Adwaita/_drawing.scss11
-rw-r--r--gtk/theme/Adwaita/gtk-contained-dark.css6
-rw-r--r--gtk/theme/Adwaita/gtk-contained.css6
3 files changed, 11 insertions, 12 deletions
diff --git a/gtk/theme/Adwaita/_drawing.scss b/gtk/theme/Adwaita/_drawing.scss
index b6a302d6a6..a48a7896c0 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 0bf0b90f53..9d256e4881 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 2328c36cc0..bc43cf18b1 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 {