aboutsummaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authoreerielili <lionel@les-miquelots.net>2024-03-02 12:27:44 +0000
committerGitHub <noreply@github.com>2024-03-02 13:27:44 +0100
commitc8700b44f492a9034f8013f330a04c2c36f2124b (patch)
treee413938595be92c32449004930646c3b60d4ba5d /main
parent4cc7e076e65c604e7a2f840ddc394ea70700577d (diff)
downloaddino-c8700b44f492a9034f8013f330a04c2c36f2124b.tar.gz
dino-c8700b44f492a9034f8013f330a04c2c36f2124b.zip
Fix poor contrast of highlight in search results with dark theme (#1557)
- fixes #1308
Diffstat (limited to 'main')
-rw-r--r--main/src/ui/global_search.vala3
1 files changed, 2 insertions, 1 deletions
diff --git a/main/src/ui/global_search.vala b/main/src/ui/global_search.vala
index 6872f631..2fb31a90 100644
--- a/main/src/ui/global_search.vala
+++ b/main/src/ui/global_search.vala
@@ -260,7 +260,8 @@ public class GlobalSearch {
for (; match_info.matches(); match_info.next()) {
int start, end;
match_info.fetch_pos(0, out start, out end);
- markup_text += Markup.escape_text(text[last_end:start]) + "<span bgcolor=\"yellow\">" + Markup.escape_text(text[start:end]) + "</span>";
+ string themed_span = Util.is_dark_theme(label) ? "<span color=\"black\" bgcolor=\"yellow\">" : "<span bgcolor=\"yellow\">";
+ markup_text += Markup.escape_text(text[last_end:start]) + themed_span + Markup.escape_text(text[start:end]) + "</span>";
last_end = end;
}
markup_text += Markup.escape_text(text[last_end:text.length]);