forked from qt-creator/qt-creator
FancyLineEdit: Fix placeholder text color
Amends 3dcdbe9069
Using the theme's PalettePlaceholderText only works for themes that
explicitly set it. Grab it from the application palette instead, which
is correct for all themes.
Observable by typing something into Locator and removing the typed text
again.
Change-Id: Iee7f900275ab7bcb37d87a2f7acddfee55fe9f79
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include "utilsicons.h"
|
||||
#include "utilstr.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QKeyEvent>
|
||||
#include <QKeySequence>
|
||||
#include <QMenu>
|
||||
@@ -126,7 +127,7 @@ FancyLineEditPrivate::FancyLineEditPrivate(FancyLineEdit *parent) :
|
||||
m_completionShortcut(completionShortcut()->key(), parent),
|
||||
m_okTextColor(creatorTheme()->color(Theme::TextColorNormal)),
|
||||
m_errorTextColor(creatorTheme()->color(Theme::TextColorError)),
|
||||
m_placeholderTextColor(creatorTheme()->color(Theme::PalettePlaceholderText))
|
||||
m_placeholderTextColor(QApplication::palette().color(QPalette::PlaceholderText))
|
||||
|
||||
{
|
||||
m_completionShortcut.setContext(Qt::WidgetShortcut);
|
||||
|
||||
Reference in New Issue
Block a user