[libadwaita/wip/exalm/accent: 3/4] Rename standalone accent/destructive colors and expose them
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/accent: 3/4] Rename standalone accent/destructive colors and expose them
- Date: Wed, 23 Jun 2021 07:44:01 +0000 (UTC)
commit a495f0491c426e60b9109155015ee8fed11bad9b
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Wed Jun 23 12:35:32 2021 +0500
Rename standalone accent/destructive colors and expose them
We originally went with an .accent style class for this use case, but it's
not always enough. For example, Solanum animates from text color to accent
color and back and needs the variable.
src/stylesheet/_colors.scss | 10 +++++-----
src/stylesheet/_defaults.scss | 2 ++
src/stylesheet/widgets/_buttons.scss | 4 ++--
src/stylesheet/widgets/_entries.scss | 2 +-
src/stylesheet/widgets/_labels.scss | 2 +-
src/stylesheet/widgets/_lists.scss | 2 +-
src/stylesheet/widgets/_sidebars.scss | 2 +-
7 files changed, 13 insertions(+), 11 deletions(-)
---
diff --git a/src/stylesheet/_colors.scss b/src/stylesheet/_colors.scss
index ba147dc3..3b5fb7dc 100644
--- a/src/stylesheet/_colors.scss
+++ b/src/stylesheet/_colors.scss
@@ -8,8 +8,11 @@ $dark_bg: darken(desaturate($dark_3, 100%), 4%);
$accent_bg_color: gtkcolor(accent_bg_color);
$accent_fg_color: gtkcolor(accent_fg_color);
+$accent_color: gtkcolor(accent_color);
+
$destructive_bg_color: gtkcolor(destructive_bg_color);
$destructive_fg_color: gtkcolor(destructive_fg_color);
+$destructive_color: gtkcolor(destructive_color);
$success_color: gtkcolor(success_color);
$warning_color: gtkcolor(warning_color);
@@ -20,14 +23,11 @@ $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);
-$accent_standalone_color: gtkmix($accent_bg_color, $text_color, if($variant == 'dark', 50%, 75%));
-$destructive_standalone_color: gtkmix($destructive_bg_color, $text_color, if($variant == 'dark', 50%, 75%));
-
$borders_color: if($variant == 'light', darken($bg_color, 18%), darken($bg_color, 10%));
$alt_borders_color: if($variant == 'light', darken($bg_color, 24%), darken($bg_color, 18%));
$borders_edge: if($variant == 'light', transparentize(white, 0.2), transparentize($fg_color, 0.93));
-$link_color: $accent_standalone_color;
-$link_visited_color: gtkmix($accent_standalone_color, $text_color, 80%);
+$link_color: $accent_color;
+$link_visited_color: gtkmix($accent_color, $text_color, 80%);
$dark_fill: mix($borders_color, $bg_color, 50%);
$headerbar_bg_color: $bg_color;
$menu_color: $base_color;
diff --git a/src/stylesheet/_defaults.scss b/src/stylesheet/_defaults.scss
index 84da869e..3cec7308 100644
--- a/src/stylesheet/_defaults.scss
+++ b/src/stylesheet/_defaults.scss
@@ -11,10 +11,12 @@
// The main accent color and the matching text value
@define-color accent_bg_color #{$blue_3};
@define-color accent_fg_color #{$light_1};
+@define-color accent_color #{if($variant == 'dark', $blue_1, $blue_5)};
// destructive-action buttons
@define-color destructive_bg_color #{$red_3};
@define-color destructive_fg_color #{$light_1};
+@define-color destructive_color #{if($variant == 'dark', $red_1, $red_5)};
// Levelbars, entries, labels and infobars. These don't need text colors
@define-color success_color #{$green_3};
diff --git a/src/stylesheet/widgets/_buttons.scss b/src/stylesheet/widgets/_buttons.scss
index 6fab1cc2..742dfd2a 100644
--- a/src/stylesheet/widgets/_buttons.scss
+++ b/src/stylesheet/widgets/_buttons.scss
@@ -212,11 +212,11 @@ button {
}
&.suggested-action {
- color: $accent_standalone_color;
+ color: $accent_color;
}
&.destructive-action {
- color: $destructive_standalone_color;
+ color: $destructive_color;
}
// Specificity bump
diff --git a/src/stylesheet/widgets/_entries.scss b/src/stylesheet/widgets/_entries.scss
index b189b0e3..88314ab3 100644
--- a/src/stylesheet/widgets/_entries.scss
+++ b/src/stylesheet/widgets/_entries.scss
@@ -56,7 +56,7 @@ entry {
&:hover { color: $fg_color; }
- &:active { color: $accent_standalone_color; }
+ &:active { color: $accent_color; }
&.left { margin-right: 6px; }
&.right { margin-left: 6px; }
diff --git a/src/stylesheet/widgets/_labels.scss b/src/stylesheet/widgets/_labels.scss
index eecf4dff..8f972afe 100644
--- a/src/stylesheet/widgets/_labels.scss
+++ b/src/stylesheet/widgets/_labels.scss
@@ -19,7 +19,7 @@ label {
}
.accent {
- color: $accent_standalone_color;
+ color: $accent_color;
}
/**********************
diff --git a/src/stylesheet/widgets/_lists.scss b/src/stylesheet/widgets/_lists.scss
index 85f7e972..6fcbd092 100644
--- a/src/stylesheet/widgets/_lists.scss
+++ b/src/stylesheet/widgets/_lists.scss
@@ -172,7 +172,7 @@ row.expander {
}
&:checked image.expander-row-arrow:not(:disabled) {
- color: $accent_standalone_color;
+ color: $accent_color;
}
& image.expander-row-arrow:disabled {
diff --git a/src/stylesheet/widgets/_sidebars.scss b/src/stylesheet/widgets/_sidebars.scss
index 50b74b72..8a0481f8 100644
--- a/src/stylesheet/widgets/_sidebars.scss
+++ b/src/stylesheet/widgets/_sidebars.scss
@@ -114,7 +114,7 @@ placessidebar {
background-clip: content-box;
}
- &.sidebar-new-bookmark-row { color: $accent_standalone_color; }
+ &.sidebar-new-bookmark-row { color: $accent_color; }
&:drop(active):not(:disabled) {
color: $drop_target_color;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]