mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-02 16:44:16 +02:00
Fix unreadable search field in the Search and Replace widget (dark theme)
The search field gets a light green or light red background to show whether the text matches, but only QPalette::Base was set. With a dark theme the text colour is light too, so the typed text was light on light and could not be read. Set QPalette::Text to black together with the light background. Fixes #1209
This commit is contained in:
@@ -446,6 +446,9 @@ void SearchAndReplaceWidget::search()
|
||||
background.setColor(QPalette::Base, match
|
||||
? QColor("#E0FFF0")
|
||||
: QColor("#FFE0EF"));
|
||||
//The background is always light: keep the text dark, or it is
|
||||
//unreadable (light on light) with a dark theme.
|
||||
background.setColor(QPalette::Text, Qt::black);
|
||||
ui->m_search_le->setPalette(background);
|
||||
|
||||
//Go to the first occurrence
|
||||
|
||||
Reference in New Issue
Block a user