[libadwaita/wip/exalm/recoloring-fixes: 23/32] stylesheet: Apply headerbar border opacity separately
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/recoloring-fixes: 23/32] stylesheet: Apply headerbar border opacity separately
- Date: Tue, 14 Sep 2021 12:11:36 +0000 (UTC)
commit 4602b6beb03dfdfde12ffc14623123627e459506
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 f00e817e..1089e0ac 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);
@@ -74,8 +75,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 ef4b5245..12e731dc 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]