diff options
author | Alessandro Portale <alessandro.portale@qt.io> | 2019-08-28 13:35:38 +0200 |
---|---|---|
committer | Alessandro Portale <alessandro.portale@qt.io> | 2019-12-18 15:27:07 +0000 |
commit | 3dc511f1d14c5662af6acfd2f5c2ff1f93402915 (patch) | |
tree | 2e3c8c980b234236839717faa695dca3fa18c087 /src/libs/utils/fancylineedit.cpp | |
parent | 962ea69a1fe61cca39f3e728dd150ccefb11f6b3 (diff) |
Utils: Use Theme default "ok" and "error" colors for FancyLineEdit
...and remove the redundant setter calls elsewhere.
Change-Id: Iec71fe1bff7f8c9dd72bf3c3e643a4ed01e4dc80
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/libs/utils/fancylineedit.cpp')
-rw-r--r-- | src/libs/utils/fancylineedit.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libs/utils/fancylineedit.cpp b/src/libs/utils/fancylineedit.cpp index 0a046e4a174..e1460d18971 100644 --- a/src/libs/utils/fancylineedit.cpp +++ b/src/libs/utils/fancylineedit.cpp @@ -134,7 +134,7 @@ public: QString m_lastFilterText; QColor m_okTextColor; - QColor m_errorTextColor = Qt::red; + QColor m_errorTextColor; QString m_errorMessage; }; @@ -143,7 +143,8 @@ FancyLineEditPrivate::FancyLineEditPrivate(FancyLineEdit *parent) : m_lineEdit(parent), m_completionShortcut(completionShortcut()->key(), parent) { - m_okTextColor = parent->palette().color(QPalette::Active, QPalette::Text); + m_okTextColor = creatorTheme()->color(Theme::TextColorNormal); + m_errorTextColor = creatorTheme()->color(Theme::TextColorError); m_completionShortcut.setContext(Qt::WidgetShortcut); connect(completionShortcut(), &CompletionShortcut::keyChanged, |