[libadwaita/wip/exalm/oapcity: 10/14] stylesheet: Fix warning/error entry focus ring in HC




commit 1e78289af3ae64b5b54a1d35043664060b4dc19e
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Thu Oct 21 23:48:02 2021 +0500

    stylesheet: Fix warning/error entry focus ring in HC
    
    We adjust focus opacity normally, but these entries are special.

 src/stylesheet/_colors.scss          | 6 ++----
 src/stylesheet/widgets/_entries.scss | 2 +-
 2 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/src/stylesheet/_colors.scss b/src/stylesheet/_colors.scss
index 8062360c..7616f13a 100644
--- a/src/stylesheet/_colors.scss
+++ b/src/stylesheet/_colors.scss
@@ -1,6 +1,7 @@
 $border_opacity: if($contrast == 'high', .5, .15);
 $thin_border_opacity: if($contrast == 'high', .25, .05);
 $card_border_opacity: if($contrast == 'high', .5, .18);
+$focus_border_opacity: if($contrast == 'high', 0.8, 0.5);
 $window_outline_opacity: if($contrast == 'high', .3, .1);
 
 // Colors from _defaults.scss
@@ -77,16 +78,13 @@ $shadow_color: transparentize(black, 0.9);
 $drop_target_color: $accent_bg_color;
 
 //special cased widget colors
-$focus_border_color:  gtkalpha($accent_bg_color, 0.5);
+$focus_border_color:  gtkalpha($accent_bg_color, $focus_border_opacity);
 $dim_label_opacity: 0.55;
 $dimmer_opacity: 0.3;
 $disabled_opacity: 0.5;
 
 // High Contrast color overrides
 @if $contrast == 'high' {
-  //focus rings
-  $focus_border_color: gtkalpha($accent_bg_color, 0.8);
-
   $dim_label_opacity: 0.9;
   $dimmer_opacity: 0.8;
   $disabled_opacity: 0.4;
diff --git a/src/stylesheet/widgets/_entries.scss b/src/stylesheet/widgets/_entries.scss
index 848af494..8901a520 100644
--- a/src/stylesheet/widgets/_entries.scss
+++ b/src/stylesheet/widgets/_entries.scss
@@ -44,7 +44,7 @@ entry {
       &.#{$e_type} {
         color: gtkmix($e_color, $view_fg_color, 70%);
 
-        @include focus-ring($focus-state: ':focus-within', $fc: gtkalpha($e_color, 0.5));
+        @include focus-ring($focus-state: ':focus-within', $fc: gtkalpha($e_color, $focus_border_opacity));
 
         > text {
           > selection:focus-within { background-color: gtkalpha($e_color, .2); }


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