QWindows11Style: Fix disabled QPallete::windowText color in light theme
Fixes: QTBUG-128499 Pick-to: 6.8 6.7 Change-Id: Ib44998f8c55485df71d1fca0724c533f81405ff4 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
This commit is contained in:
parent
0a37f038bf
commit
ff1273b360
@ -2247,6 +2247,7 @@ static void populateLightSystemBasePalette(QPalette &result)
|
|||||||
const bool styleSheetChanged = oldStyleSheet != qApp->styleSheet();
|
const bool styleSheetChanged = oldStyleSheet != qApp->styleSheet();
|
||||||
|
|
||||||
const QColor textColor = QColor(0x00,0x00,0x00,0xE4);
|
const QColor textColor = QColor(0x00,0x00,0x00,0xE4);
|
||||||
|
const QColor textDisabled = QColor(0x00,0x00,0x00,0x5C);
|
||||||
const QColor btnFace = QColor(0xFF,0xFF,0xFF,0xB3);
|
const QColor btnFace = QColor(0xFF,0xFF,0xFF,0xB3);
|
||||||
const QColor alternateBase = QColor(0x00,0x00,0x00,0x09);
|
const QColor alternateBase = QColor(0x00,0x00,0x00,0x09);
|
||||||
const QColor btnHighlight = result.accent().color();
|
const QColor btnHighlight = result.accent().color();
|
||||||
@ -2269,6 +2270,8 @@ static void populateLightSystemBasePalette(QPalette &result)
|
|||||||
SET_IF_UNRESOLVED(QPalette::All, QPalette::ToolTipText, result.windowText().color());
|
SET_IF_UNRESOLVED(QPalette::All, QPalette::ToolTipText, result.windowText().color());
|
||||||
SET_IF_UNRESOLVED(QPalette::All, QPalette::AlternateBase, alternateBase);
|
SET_IF_UNRESOLVED(QPalette::All, QPalette::AlternateBase, alternateBase);
|
||||||
|
|
||||||
|
result.setColor(QPalette::Disabled, QPalette::WindowText, textDisabled);
|
||||||
|
|
||||||
if (result.midlight() == result.button())
|
if (result.midlight() == result.button())
|
||||||
result.setColor(QPalette::Midlight, btnColor.lighter(110));
|
result.setColor(QPalette::Midlight, btnColor.lighter(110));
|
||||||
oldStyleSheet = qApp->styleSheet();
|
oldStyleSheet = qApp->styleSheet();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user