[libadwaita/wip/exalm/recoloring-fixes: 23/32] stylesheet: Apply headerbar border opacity separately




commit d6da0c04ee057e9051f25a8dd71a1be378dd7167
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Wed Sep 1 17:00:57 2021 +0500

    stylesheet: Apply headerbar border opacity separately
    
    Don't include it into $headerbar_border_color.

 src/stylesheet/_colors.scss             | 5 ++---
 src/stylesheet/widgets/_header-bar.scss | 9 ++++++---
 src/stylesheet/widgets/_tab-view.scss   | 2 +-
 3 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/src/stylesheet/_colors.scss b/src/stylesheet/_colors.scss
index 62dad9e4..e15de20c 100644
--- a/src/stylesheet/_colors.scss
+++ b/src/stylesheet/_colors.scss
@@ -29,7 +29,8 @@ $link_color: $accent_color;
 $link_visited_color: gtkmix($accent_color, $text_color, 80%);
 $dark_fill: if($variant == 'light', darken($bg_color, 9%), darken($bg_color, 5%));
 $headerbar_bg_color: darken($bg_color, if($variant == 'dark', 5%, 10%));
-$headerbar_border_color: transparentize($fg_color, .85);
+$headerbar_fg_color: $fg_color;
+$headerbar_border_color: $fg_color;
 $menu_color: $base_color;
 
 $view_hover_color: gtkalpha(currentColor, .07);
@@ -76,8 +77,6 @@ $dim_label_opacity: 0.55;
   $borders_color: gtkalpha(currentColor, .5);
   $thin_borders_color: gtkalpha(currentColor, .25);
 
-  $headerbar_border_color: transparentize($fg_color, .5);
-
   //focus rings
   $focus_border_color: gtkalpha($accent_bg_color, 0.8);
   $alt_focus_border_color: if($variant == 'light', white, transparentize(white,0.4));
diff --git a/src/stylesheet/widgets/_header-bar.scss b/src/stylesheet/widgets/_header-bar.scss
index 29e2c999..57558768 100644
--- a/src/stylesheet/widgets/_header-bar.scss
+++ b/src/stylesheet/widgets/_header-bar.scss
@@ -1,9 +1,12 @@
+$headerbar_border_opacity: if($contrast == 'high', .5, .15);
+
 headerbar {
   min-height: 47px;
   background-color: $headerbar_bg_color;
-  box-shadow: inset 0 -1px $headerbar_border_color,
-              inset  1px 0 $headerbar_border_color,
-              inset -1px 0 $headerbar_border_color;
+  color: $headerbar_fg_color;
+  box-shadow: inset 0 -1px gtkalpha($headerbar_border_color, $headerbar_border_opacity),
+              inset  1px 0 gtkalpha($headerbar_border_color, $headerbar_border_opacity),
+              inset -1px 0 gtkalpha($headerbar_border_color, $headerbar_border_opacity);
 
   margin-left: -1px;
   margin-right: -1px;
diff --git a/src/stylesheet/widgets/_tab-view.scss b/src/stylesheet/widgets/_tab-view.scss
index 8b1da141..5d0887bf 100644
--- a/src/stylesheet/widgets/_tab-view.scss
+++ b/src/stylesheet/widgets/_tab-view.scss
@@ -1,5 +1,5 @@
 $tab_bg: $headerbar_bg_color;
-$tab_border: mix(opacify($headerbar_border_color, 1), $headerbar_bg_color, 100% * 
alpha($headerbar_border_color));
+$tab_border: gtkmix($headerbar_border_color, $headerbar_bg_color, 100% * $headerbar_border_opacity);
 
 @mixin undershoot-gradient($dir) {
   @if $variant == 'dark' {


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