[libadwaita/wip/exalm/backdrop: 1/5] stylesheet: Inline headerbar_fill()




commit 3ba1ac319bfd16ae80a8412c212aa60b1ed6ac64
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Fri Apr 30 17:33:22 2021 +0500

    stylesheet: Inline headerbar_fill()
    
    It's only used once and it's very simple, there's no good reason to keep
    it.

 src/stylesheet/_drawing.scss            | 16 ----------------
 src/stylesheet/widgets/_header-bar.scss | 10 ++++++++--
 2 files changed, 8 insertions(+), 18 deletions(-)
---
diff --git a/src/stylesheet/_drawing.scss b/src/stylesheet/_drawing.scss
index 1c1a842..da6ff09 100644
--- a/src/stylesheet/_drawing.scss
+++ b/src/stylesheet/_drawing.scss
@@ -275,22 +275,6 @@ $_default_button_c: lighten($bg_color,2%);
   }
 }
 
-@mixin headerbar_fill($c:$headerbar_bg_color, $ov: none) {
-//
-// headerbar fill
-//
-// $c:  base color
-// $ov: a background layer for background shorthand (hence no commas!)
-//
-  $gradient: linear-gradient(to top, darken($c, 2%), lighten($c, 1%));
-
-  @if $variant == 'dark' { $gradient: linear-gradient(to top, lighten($c, 4%), lighten($c, 6%)); }
-
-  @if $ov != none { background: $c $ov, $gradient; }
-  @else { background: $c $gradient; }
-
-}
-
 @mixin overshoot($p, $c:$fg_color) {
 //
 // overshoot
diff --git a/src/stylesheet/widgets/_header-bar.scss b/src/stylesheet/widgets/_header-bar.scss
index d9c77d8..fe8eee4 100644
--- a/src/stylesheet/widgets/_header-bar.scss
+++ b/src/stylesheet/widgets/_header-bar.scss
@@ -1,3 +1,10 @@
+$_header_bar_color: darken($bg_color, 10%);
+$_header_bar_gradient: linear-gradient(to top, darken($_header_bar_color, 2%), lighten($_header_bar_color, 
1%));
+
+@if $variant == 'dark' {
+  $_header_bar_gradient: linear-gradient(to top, lighten($_header_bar_color, 4%), 
lighten($_header_bar_color, 6%));
+}
+
 headerbar {
   padding: 0 6px;
   min-height: 46px;
@@ -5,6 +12,7 @@ headerbar {
   border-style: solid;
   border-color: $alt_borders_color;
   border-radius: 0;
+  background-image: $_header_bar_gradient;
 
   > windowhandle > box {
     &,
@@ -14,8 +22,6 @@ headerbar {
     }
   }
 
-  @include headerbar_fill(darken($bg_color, 10%));
-
   &:backdrop {
     background-color: $bg_color;
     background-image: none;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]