QKdeTheme: update color scheme with unknown desktop theme
When a KDE theme name doesn't contain the keywords "dark" or "light", QKdeThemePrivate::updateColorScheme() falls back to heuristics. It compares text and base color. It sets the color scheme to dark, if text is lighter than base and otherwise to light. When the theme name can't be read from KDE settings, because it is stored on a different location or not yet set, the heuristics fallback doesn't happen. The color scheme always becomes "Unknown". Remove this limitation to the benefit of currently unsupported Linuxes. Fixes: QTBUG-125285 Pick-to: 6.7 Change-Id: I120dd23eee71b14ea8ce3735c3f53bda2caa403e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>bb10
parent
e771e5e2d7
commit
71d0de9835
|
|
@ -833,10 +833,7 @@ void QKdeThemePrivate::refresh()
|
|||
|
||||
const QVariant colorScheme = readKdeSetting(KdeSetting::ColorScheme);
|
||||
|
||||
if (colorScheme.isValid())
|
||||
updateColorScheme(colorScheme.toString());
|
||||
else
|
||||
m_colorScheme = Qt::ColorScheme::Unknown;
|
||||
updateColorScheme(colorScheme.toString());
|
||||
|
||||
const QVariant singleClickValue = readKdeSetting(KdeSetting::SingleClick);
|
||||
if (singleClickValue.isValid())
|
||||
|
|
|
|||
Loading…
Reference in New Issue