Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++

Qt6: Set PlaceholderText color role

Freya Lupen98b279469b4a
diff --git a/libs/ui/thememanager.cpp b/libs/ui/thememanager.cpp
index 9a2584a5b3..81ca21e9c5 100644
--- a/libs/ui/thememanager.cpp
+++ b/libs/ui/thememanager.cpp
@@ -173,6 +173,7 @@ void ThemeManager::slotChangePalette()
palette.setBrush(state, QPalette::HighlightedText, schemeSelection.foreground());
palette.setBrush(state, QPalette::ToolTipBase, schemeTooltip.background());
palette.setBrush(state, QPalette::ToolTipText, schemeTooltip.foreground());
+ palette.setBrush(state, QPalette::PlaceholderText, schemeView.foreground(KColorScheme::InactiveText));
palette.setColor(state, QPalette::Light, schemeWindow.shade(KColorScheme::LightShade));
palette.setColor(state, QPalette::Midlight, schemeWindow.shade(KColorScheme::MidlightShade));
diff --git a/libs/widgetutils/config/kcolorscheme.cpp b/libs/widgetutils/config/kcolorscheme.cpp
index 6176aca465..82c3e78fa5 100644
--- a/libs/widgetutils/config/kcolorscheme.cpp
+++ b/libs/widgetutils/config/kcolorscheme.cpp
@@ -572,6 +572,7 @@ QPalette KColorScheme::createApplicationPalette(const KSharedConfigPtr &config)
palette.setBrush(state, QPalette::HighlightedText, schemeSelection.foreground());
palette.setBrush(state, QPalette::ToolTipBase, schemeTooltip.background());
palette.setBrush(state, QPalette::ToolTipText, schemeTooltip.foreground());
+ palette.setBrush(state, QPalette::PlaceholderText, schemeView.foreground(KColorScheme::InactiveText));
palette.setColor(state, QPalette::Light, schemeWindow.shade(KColorScheme::LightShade));
palette.setColor(state, QPalette::Midlight, schemeWindow.shade(KColorScheme::MidlightShade));