[libadwaita/wip/exalm/buttons-5: 20/20] stylesheet: Brighten accent color for dark variant




commit f475f5edcd85fd4b75c916b5cd2439bf526b6fe3
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Thu Jun 10 23:29:25 2021 +0500

    stylesheet: Brighten accent color for dark variant
    
    We finally can do it.
    
    Remove a bunch of dark variant overrides as well.
    
    Fixes https://gitlab.gnome.org/GNOME/libadwaita/-/issues/182

 src/stylesheet/_colors.scss          | 18 +++++++++---------
 src/stylesheet/widgets/_buttons.scss |  8 +++-----
 2 files changed, 12 insertions(+), 14 deletions(-)
---
diff --git a/src/stylesheet/_colors.scss b/src/stylesheet/_colors.scss
index a9840a26..8b0d70cf 100644
--- a/src/stylesheet/_colors.scss
+++ b/src/stylesheet/_colors.scss
@@ -7,13 +7,13 @@ $bg_color: if($variant == 'light', #f6f5f4, darken(desaturate(#3d3846, 100%), 4%
 $fg_color: if($variant == 'light', #2e3436, #eeeeec);
 
 $selected_fg_color: #ffffff;
-$selected_bg_color: if($variant == 'light', #3584e4, darken(#3584e4, 20%));
-$selected_borders_color: if($variant== 'light', darken($selected_bg_color, 15%), darken($selected_bg_color, 
30%));
+$selected_bg_color: if($variant == 'light', #3584e4, #62a0ea);
+$selected_borders_color: darken($selected_bg_color, 15%);
 $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: if($variant == 'light', darken($selected_bg_color, 10%), lighten($selected_bg_color, 20%));
-$link_visited_color: if($variant == 'light', darken($selected_bg_color, 20%), lighten($selected_bg_color, 
10%));
+$link_color:darken($selected_bg_color, 10%);
+$link_visited_color: darken($selected_bg_color, 20%);
 $dark_fill: mix($borders_color, $bg_color, 50%);
 $headerbar_bg_color: $bg_color;
 $menu_color: $base_color;
@@ -46,13 +46,13 @@ $slider_hover_color: white;
 $scrollbar_bg_color: if($variant == 'light', mix($bg_color, $fg_color, 80%), mix($base_color, $bg_color, 
50%));
 $scrollbar_slider_color: mix($fg_color, $bg_color, 60%);
 $scrollbar_slider_hover_color: mix($fg_color, $bg_color, 80%);
-$scrollbar_slider_active_color: if($variant=='light', darken($selected_bg_color, 10%), 
lighten($selected_bg_color, 10%));
+$scrollbar_slider_active_color: darken($selected_bg_color, 10%);
 
 $warning_color: #f57900;
 $error_color: #cc0000;
 $success_color: if($variant == 'light', #33d17a, darken(#33d17a, 10%));
-$suggested_color: if($variant == 'light', $selected_bg_color, $selected_bg_color);
-$suggested_text_color: if($variant == 'light', darken($suggested_color, 10%), lighten($suggested_color, 
20%));
+$suggested_color: $selected_bg_color;
+$suggested_text_color: if($variant == 'light', darken($suggested_color, 10%), lighten($suggested_color, 
10%));
 $destructive_color: if($variant == 'light', #e01b24, darken(#e01b24, 10%));
 $destructive_text_color: if($variant == 'light', darken($destructive_color, 10%), 
lighten($destructive_color, 20%));
 
@@ -78,7 +78,7 @@ $insensitive_borders_color: mix($borders_color, $bg_color, 80%);
 //special cased widget colors
 $suggested_bg_color: $selected_bg_color;
 $suggested_border_color: $selected_borders_color;
-$focus_border_color: if($variant == 'light', transparentize($selected_bg_color, 0.5), 
transparentize($selected_bg_color, 0.3));
+$focus_border_color:  transparentize($selected_bg_color, 0.5);
 $alt_focus_border_color: if($variant == 'light', transparentize(white, 0.2), transparentize(white,0.7));
 $dim_label_opacity: 0.55;
 
@@ -98,7 +98,7 @@ $dim_label_opacity: 0.55;
   $insensitive_borders_color: mix($borders_color, $bg_color, 80%);
 
   //focus rings
-  $focus_border_color: if($variant == 'light', transparentize($selected_bg_color, 0.2), 
transparentize(white, 0.4));
+  $focus_border_color: transparentize($selected_bg_color, 0.2);
   $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 7d389bd3..8d68c80a 100644
--- a/src/stylesheet/widgets/_buttons.scss
+++ b/src/stylesheet/widgets/_buttons.scss
@@ -1,9 +1,7 @@
 // stuff for .needs-attention
-$_dot_color: if($variant=='light', $selected_bg_color,
-                                   lighten($selected_bg_color,15%));
 @keyframes needs_attention {
-  from { background-image: radial-gradient(farthest-side, $_dot_color 0%, transparentize($_dot_color, 1) 
0%); }
-  to { background-image: radial-gradient(farthest-side, $_dot_color 95%, transparentize($_dot_color, 1)); }
+  from { background-image: radial-gradient(farthest-side, $selected_bg_color 0%, 
transparentize($selected_bg_color, 1) 0%); }
+  to { background-image: radial-gradient(farthest-side, $selected_bg_color 95%, 
transparentize($selected_bg_color, 1)); }
 }
 
 %button,
@@ -257,7 +255,7 @@ button {
   // simulates the shadow labels and icons normally have in buttons.
   animation: needs_attention 150ms ease-in;
 
-  background-image: radial-gradient(farthest-side, $_dot_color 96%, transparentize($_dot_color,1 ));
+  background-image: radial-gradient(farthest-side, $selected_bg_color 96%, 
transparentize($selected_bg_color, 1));
   background-size: 6px 6px, 6px 6px;
   background-repeat: no-repeat;
 


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