From 2c951f122d0a6e6ade3d96104b46820c89a92e13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nelson=20Ben=C3=ADtez=20Le=C3=B3n?= Date: Sun, 12 Mar 2023 18:47:59 -0400 Subject: [PATCH] dark theme: create $caret_color and use it 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 | 1 + gtk/theme/Adwaita/_common.scss | 1 + 2 files changed, 2 insertions(+) diff --git a/gtk/theme/Adwaita/_colors.scss b/gtk/theme/Adwaita/_colors.scss index 32dd7625d5..422eab6708 100644 --- a/gtk/theme/Adwaita/_colors.scss +++ b/gtk/theme/Adwaita/_colors.scss @@ -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); diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss index dc02b49aca..b9db6041d5 100644 --- a/gtk/theme/Adwaita/_common.scss +++ b/gtk/theme/Adwaita/_common.scss @@ -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 {