dark theme: create $caret_color and use it
authorNelson Benítez León <nbenitezl@gmail.com>
Sun, 12 Mar 2023 22:47:59 +0000 (18:47 -0400)
committerNelson Benítez León <nbenitezl@gmail.com>
Sun, 12 Mar 2023 22:50:56 +0000 (18:50 -0400)
Fixes Evince showing a dark caret when using
dark theme, which makes it almost invisible.

This is in css node "textview text" of Evince
annotation window (a GtkScrolledWindow).

We create a new $caret_color var based on
$text_color and use it accordingly.

Fixes evince#1842

gtk/theme/Adwaita/_colors.scss
gtk/theme/Adwaita/_common.scss

index 32dd7625d53d0b0ac7925f653347516b0b9d8d14..422eab67080aa659b13e262ba74b94bb3cf0f6f1 100644 (file)
@@ -3,6 +3,7 @@
 
 $base_color: if($variant == 'light', #ffffff, lighten(desaturate(#241f31, 100%), 2%));
 $text_color: if($variant == 'light', black, white);
+$caret_color: if($variant == 'light', lighten($text_color, 5%), darken($text_color, 3%));
 $bg_color: if($variant == 'light', #f6f5f4, darken(desaturate(#3d3846, 100%), 4%));
 $fg_color: if($variant == 'light', #2e3436, #eeeeec);
 
index dc02b49acaeefdfc2f78480a9cab25fb7a4b98b5..b9db6041d5fceaa3bd22137fd2689eece41d9142 100644 (file)
@@ -108,6 +108,7 @@ $_switch_margin: if($_sizevariant=='default', 10px, 7px);
 .view,
 %view {
   color: $text_color;
+  caret-color: $caret_color;
   background-color: $base_color;
 
   &:backdrop {