diff options
author | Lapo Calamandrei <calamandrei@gmail.com> | 2016-05-05 18:07:55 +0200 |
---|---|---|
committer | Lapo Calamandrei <calamandrei@gmail.com> | 2016-05-05 18:07:55 +0200 |
commit | 7dbe3d953dfdeea6482f21b7e1ab20a762d34c01 (patch) | |
tree | e12ac13221c4a6d2efa776abe164decafd2eeaf1 | |
parent | 80a93be9e6e3a626a7790256674fb306f54e9cc2 (diff) | |
download | gtk+-7dbe3d953dfdeea6482f21b7e1ab20a762d34c01.tar.gz |
Adwaita: more flexible headerbar_fill mixin
adding an additional background layer as a parameter.
-rw-r--r-- | gtk/theme/Adwaita/_drawing.scss | 11 | ||||
-rw-r--r-- | gtk/theme/Adwaita/gtk-contained-dark.css | 6 | ||||
-rw-r--r-- | 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 206387efd7..6975dcf762 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 0c4215e3db..36c393c286 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 52f72d639c..28c4487d0b 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 { |