[libadwaita/wip/exalm/background-colors: 64/64] a
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/background-colors: 64/64] a
- Date: Mon, 18 Oct 2021 10:11:18 +0000 (UTC)
commit 8a18ad9e69ce571407ee41899bf989d85acec4fc
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Fri Oct 1 23:34:33 2021 +0500
a
src/stylesheet/_colors.scss | 13 ++++++++++---
src/stylesheet/widgets/_buttons.scss | 6 ++----
src/stylesheet/widgets/_color-chooser.scss | 4 ++--
src/stylesheet/widgets/_popovers.scss | 4 +---
src/stylesheet/widgets/_tab-view.scss | 27 ++++++---------------------
src/stylesheet/widgets/_window.scss | 28 ++++++++++------------------
6 files changed, 31 insertions(+), 51 deletions(-)
---
diff --git a/src/stylesheet/_colors.scss b/src/stylesheet/_colors.scss
index a8b16992..2cbf0306 100644
--- a/src/stylesheet/_colors.scss
+++ b/src/stylesheet/_colors.scss
@@ -37,7 +37,12 @@ $error_color: gtkcolor(error_color);
@define-color popover_fg_color #{if($variant == 'light', transparentize(black, .2), white)};
@define-color shade_color #{if($variant == 'light', transparentize(black, .93),
transparentize(black, .64))};
+@define-color window_outline_color #{if($variant == 'light', transparent, white)};
+@define-color window_border_color #{if($variant == 'light', transparentize(black, 0.77),
transparentize(black, 0.25))};
+@define-color window_border_backdrop_color #{if($variant == 'light', transparentize(black, 0.82),
transparentize(black, 0.25))};
+
$border_opacity: if($contrast == 'high', .5, .15);
+$window_outline_opacity: if($contrast == 'high', .3, .1);
$base_color: gtkcolor(base_color);
$text_color: gtkcolor(text_color);
@@ -53,11 +58,15 @@ $dark_fill_border_color: gtkalpha(gtkcolor(dark_fill_border_color), $border_opac
$card_bg_color: gtkcolor(card_bg_color);
$card_fg_color: gtkcolor(card_fg_color);
$card_border_color: gtkcolor(card_border_color);
-$scrollbar_outline_color: gtkcolor(scrollbar-outline_color);
+$scrollbar_outline_color: gtkcolor(scrollbar_outline_color);
$popover_bg_color: gtkcolor(popover_bg_color);
$popover_fg_color: gtkcolor(popover_fg_color);
$shade_color: gtkcolor(shade_color);
+$window_outline_color: gtkalpha(gtkcolor(window_outline_color), $window_outline_opacity);
+$window_border_color: gtkcolor(window_border_color);
+$window_border_backdrop_color: gtkcolor(window_border_backdrop_color);
+
$borders_color: gtkalpha(currentColor, $border_opacity);
$thin_borders_color: gtkalpha(currentColor, .05);
$link_color: $accent_color;
@@ -92,7 +101,6 @@ $drop_target_color: if($variant == 'light', $green_4, $green_5);
//special cased widget colors
$focus_border_color: gtkalpha($accent_bg_color, 0.5);
-$alt_focus_border_color: if($variant == 'light', transparentize(white, 0.2), transparentize(white,0.7));
$dim_label_opacity: 0.55;
// High Contrast color overrides
@@ -103,7 +111,6 @@ $dim_label_opacity: 0.55;
//focus rings
$focus_border_color: gtkalpha($accent_bg_color, 0.8);
- $alt_focus_border_color: if($variant == 'light', white, transparentize(white,0.4));
$dim_label_opacity: 0.9;
diff --git a/src/stylesheet/widgets/_buttons.scss b/src/stylesheet/widgets/_buttons.scss
index dd6c06db..31106e72 100644
--- a/src/stylesheet/widgets/_buttons.scss
+++ b/src/stylesheet/widgets/_buttons.scss
@@ -309,10 +309,8 @@ button.color {
filter: none;
}
- @if $variant == 'light' {
- &.light > overlay {
- border-color: transparentize(black, .8);
- }
+ &.light > overlay {
+ border-color: gtkalpha($text_color, 0.1);
}
}
}
diff --git a/src/stylesheet/widgets/_color-chooser.scss b/src/stylesheet/widgets/_color-chooser.scss
index d4b34ab7..97aa16a8 100644
--- a/src/stylesheet/widgets/_color-chooser.scss
+++ b/src/stylesheet/widgets/_color-chooser.scss
@@ -67,8 +67,8 @@ colorswatch {
&.light > overlay {
color: transparentize(black, .25);
- @if $variant == 'light' and $contrast != 'high' {
- box-shadow: inset 0 0 0 1px transparentize(black, 0.9);
+ @if $contrast != 'high' {
+ box-shadow: inset 0 0 0 1px gtkalpha($text_color, 0.1);
}
}
diff --git a/src/stylesheet/widgets/_popovers.scss b/src/stylesheet/widgets/_popovers.scss
index aa2b1457..38d45c42 100644
--- a/src/stylesheet/widgets/_popovers.scss
+++ b/src/stylesheet/widgets/_popovers.scss
@@ -4,12 +4,10 @@ popover.background {
> arrow,
> contents {
- $_popover_border: if($variant=='light', transparentize(black, 0.77), transparentize(black, 0.25));
-
background-color: $popover_bg_color;
color: $popover_fg_color;
background-clip: padding-box;
- border: 1px solid $_popover_border;
+ border: 1px solid $window_border_color;
box-shadow: 0 1px 2px transparentize(black, 0.7);
}
diff --git a/src/stylesheet/widgets/_tab-view.scss b/src/stylesheet/widgets/_tab-view.scss
index 71045503..4ea45b98 100644
--- a/src/stylesheet/widgets/_tab-view.scss
+++ b/src/stylesheet/widgets/_tab-view.scss
@@ -1,21 +1,12 @@
-
$tab_needs_attention_gradient: radial-gradient(ellipse at bottom,
transparentize(white, .2),
gtkalpha($accent_bg_color, .2) 15%,
gtkalpha($accent_bg_color, 0) 15%);
-
@mixin undershoot-gradient($dir) {
- @if $variant == 'dark' {
- background: linear-gradient(to #{$dir},
- transparentize(black, .6),
- transparentize(black, 1) 20px);
- }
- @else {
- background: linear-gradient(to #{$dir},
- transparentize(black, .93),
- transparentize(black, 1) 20px);
- }
+ background: linear-gradient(to #{$dir},
+ $shade_color,
+ transparentize(black, 1) 20px);
}
@mixin need-attention-gradient($dir) {
@@ -147,17 +138,11 @@ dnd tab {
background-image: $tab_needs_attention_gradient;
}
- $_wm_border: if($variant=='light', transparentize(black, 0.77), transparentize(black, 0.25));
-
box-shadow: 0 3px 9px 1px transparentize(black, 0.75),
- 0 0 0 1px $_wm_border;
+ 0 0 0 1px $window_border_color;
- @if $variant == 'dark' {
- $_wm_outline: if($contrast=='high', transparentize(white, .7), transparentize(white, .9));
-
- outline: 1px solid $_wm_outline;
- outline-offset: -1px;
- }
+ outline: 1px solid $window_outline_color;
+ outline-offset: -1px;
margin: 25px;
}
diff --git a/src/stylesheet/widgets/_window.scss b/src/stylesheet/widgets/_window.scss
index 0c2ab457..2df5d1a9 100644
--- a/src/stylesheet/widgets/_window.scss
+++ b/src/stylesheet/widgets/_window.scss
@@ -2,25 +2,17 @@ window {
// lamefun trick to get rounded borders regardless of CSD use
border-width: 0px;
- // this needs to be transparent
- // see bug #722563
- $_wm_border: if($variant=='light', transparentize(black, 0.77), transparentize(black, 0.25));
- $_wm_border_backdrop: if($variant=='light', transparentize(black, 0.82), transparentize(black, 0.25));
-
&.csd {
box-shadow: 0 1px 3px 3px transparent,
0 2px 8px 2px transparentize(black, 0.87),
0 3px 20px 10px transparentize(black, 0.91),
0 6px 32px 16px transparentize(black, 0.96),
- 0 0 0 1px $_wm_border; //doing borders with box-shadow
+ 0 0 0 1px $window_border_color; //doing borders with box-shadow
margin: 0px;
border-radius: $window_radius;
- @if $variant == 'dark' {
- $_window_outline: if($contrast=='high', transparentize(white, .7), transparentize(white, .9));
- outline: 1px solid $_window_outline;
- outline-offset: -1px;
- }
+ outline: 1px solid $window_outline_color;
+ outline-offset: -1px;
&:backdrop {
// the transparent shadow here is to enforce that the shadow extents don't
@@ -31,13 +23,13 @@ window {
0 2px 14px 5px transparentize(black, 0.95),
0 4px 28px 12px transparentize(black, 0.97),
0 6px 32px 16px transparent,
- 0 0 0 1px $_wm_border_backdrop;
+ 0 0 0 1px $window_border_backdrop_color;
transition: $backdrop_transition;
}
&.dialog.message {
box-shadow: 0 1px 2px transparentize(black, 0.8),
- 0 0 0 1px transparentize($_wm_border, 0.1);
+ 0 0 0 1px $window_border_color;
}
&.tiled,
@@ -48,11 +40,11 @@ window {
border-radius: 0;
outline: none;
- box-shadow: 0 0 0 1px $_wm_border,
+ box-shadow: 0 0 0 1px $window_border_color,
0 0 0 20px transparent; //transparent control workaround -- #3670
&:backdrop {
- box-shadow: 0 0 0 1px $_wm_border_backdrop,
+ box-shadow: 0 0 0 1px $window_border_backdrop_color,
0 0 0 20px transparent;
}
}
@@ -72,15 +64,15 @@ window {
border-radius: 0;
box-shadow: inset 0 0 0 5px $borders_color,
inset 0 0 0 4px $headerbar_bg_color,
- inset 0 0 0 1px $_wm_border;
+ inset 0 0 0 1px $window_border_color;
&:backdrop {
box-shadow: inset 0 0 0 5px $borders_color,
inset 0 0 0 4px $headerbar_backdrop_color,
- inset 0 0 0 1px $_wm_border_backdrop;
+ inset 0 0 0 1px $window_border_backdrop_color;
}
}
// server-side decorations as used by mutter
- &.ssd { box-shadow: 0 0 0 1px $_wm_border; } //just doing borders, wm draws actual shadows
+ &.ssd { box-shadow: 0 0 0 1px $window_border_color; } //just doing borders, wm draws actual shadows
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]