From 626728609b046f975b910edb8bc00b63d99e5b9f Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Tue, 17 Nov 2020 22:34:00 +0100 Subject: [PATCH] TextEditor: Define default foreground colors for C_SEARCH_RESULT_ALT1|2 Since the background colors were defined, also the foreground colors need to be defined to make sure that both light and dark schemes which do not define C_SEARCH_RESULT_ALT1|2 have a legible contrast. Change-Id: Ic954852bdc66d3534f664658b914af1a30795a7d Reviewed-by: Eike Ziller --- src/plugins/texteditor/fontsettingspage.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/texteditor/fontsettingspage.cpp b/src/plugins/texteditor/fontsettingspage.cpp index d2b3dd3ae40..42c14549c40 100644 --- a/src/plugins/texteditor/fontsettingspage.cpp +++ b/src/plugins/texteditor/fontsettingspage.cpp @@ -299,6 +299,10 @@ QColor FormatDescription::defaultForeground(TextStyle id) return QColor(Qt::red); } else if (id == C_AUTOCOMPLETE) { return QColor(Qt::darkBlue); + } else if (id == C_SEARCH_RESULT_ALT1) { + return QColor(0x00, 0x00, 0x33); + } else if (id == C_SEARCH_RESULT_ALT2) { + return QColor(0x33, 0x00, 0x00); } return QColor(); }