[libadwaita/wip/exalm/background-colors2: 10/17] stylesheet: Reorganize tab border color
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/background-colors2: 10/17] stylesheet: Reorganize tab border color
- Date: Fri, 1 Oct 2021 13:23:57 +0000 (UTC)
commit 5cbfa3b0feaf2f6bce02dc7259a66bbc30b439fd
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Fri Oct 1 17:08:52 2021 +0500
stylesheet: Reorganize tab border color
src/stylesheet/_colors.scss | 6 +++---
src/stylesheet/widgets/_header-bar.scss | 8 +++-----
src/stylesheet/widgets/_tab-view.scss | 13 ++++++-------
3 files changed, 12 insertions(+), 15 deletions(-)
---
diff --git a/src/stylesheet/_colors.scss b/src/stylesheet/_colors.scss
index 142b37b5..1ed7c7a8 100644
--- a/src/stylesheet/_colors.scss
+++ b/src/stylesheet/_colors.scss
@@ -23,14 +23,15 @@ $text_color: if($variant == 'light', black, white);
$bg_color: if($variant == 'light', $light_bg, $dark_bg);
$fg_color: if($variant == 'light', $light_fg, $dark_fg);
-$borders_color: gtkalpha(currentColor, .15);
+$border_opacity: if($contrast == 'high', .5, .15);
+$borders_color: gtkalpha(currentColor, $border_opacity);
$thin_borders_color: gtkalpha(currentColor, .05);
$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_fg_color: $fg_color;
-$headerbar_border_color: $fg_color;
+$headerbar_border_color: gtkalpha($fg_color, $border_opacity);
$headerbar_backdrop_color: $bg_color;
$popover_bg_color: $base_color;
@@ -73,7 +74,6 @@ $dim_label_opacity: 0.55;
$fg_color: if($variant == 'light', darken($fg_color, 3%), lighten($fg_color, 2%));
$bg_color: if($variant == 'light', lighten($bg_color, 3%), darken($bg_color, 2%));
- $borders_color: gtkalpha(currentColor, .5);
$thin_borders_color: gtkalpha(currentColor, .25);
//focus rings
diff --git a/src/stylesheet/widgets/_header-bar.scss b/src/stylesheet/widgets/_header-bar.scss
index dcdc38cc..0c692299 100644
--- a/src/stylesheet/widgets/_header-bar.scss
+++ b/src/stylesheet/widgets/_header-bar.scss
@@ -1,12 +1,10 @@
-$headerbar_border_opacity: if($contrast == 'high', .5, .15);
-
headerbar {
min-height: 47px;
background-color: $headerbar_bg_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);
+ box-shadow: inset 0 -1px $headerbar_border_color,
+ inset 1px 0 $headerbar_border_color,
+ inset -1px 0 $headerbar_border_color;
margin-left: -1px;
margin-right: -1px;
diff --git a/src/stylesheet/widgets/_tab-view.scss b/src/stylesheet/widgets/_tab-view.scss
index e7fb32a4..7971365b 100644
--- a/src/stylesheet/widgets/_tab-view.scss
+++ b/src/stylesheet/widgets/_tab-view.scss
@@ -1,5 +1,4 @@
$tab_bg: $headerbar_bg_color;
-$tab_border: gtkalpha($headerbar_border_color, $headerbar_border_opacity);
@mixin undershoot-gradient($dir) {
@if $variant == 'dark' {
@@ -26,12 +25,12 @@ tabbar {
min-height: 38px;
background: $headerbar_bg_color;
color: $headerbar_fg_color;
- border-bottom: 1px solid $tab_border;
+ border-bottom: 1px solid $headerbar_border_color;
}
scrolledwindow.pinned {
undershoot {
- border: 0 solid $tab_border;
+ border: 0 solid $headerbar_border_color;
}
&:dir(rtl) undershoot.left {
@@ -44,11 +43,11 @@ tabbar {
tabbox > background {
&:dir(ltr) {
- box-shadow: inset -1px 0 $tab_border;
+ box-shadow: inset -1px 0 $headerbar_border_color;
}
&:dir(rtl) {
- box-shadow: inset 1px 0 $tab_border;
+ box-shadow: inset 1px 0 $headerbar_border_color;
}
}
}
@@ -79,7 +78,7 @@ tabbar {
tab {
border-style: solid;
- border-color: $tab_border;
+ border-color: $headerbar_border_color;
border-width: 0 1px 0 1px;
transition: background 150ms ease-in-out, $focus_transition;
background-color: $tab_bg;
@@ -104,7 +103,7 @@ tabbar {
.end-action {
background-color: $tab_bg;
background-clip: padding-box;
- border-color: $tab_border;
+ border-color: $headerbar_border_color;
border-style: solid;
transition: background 150ms ease-in-out;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]