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




commit 4e14438a16b17c5c6faa79f98f48f5a4a0542c6a
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 5881cbcf..6817e01a 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.3;
 
 // 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.5;
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]