QWindowsTheme: only set inactive accent color to Window if not set
Otherwise it incorrectly changes to a white-ish color when the window becomes inactive, when native apps keep the accent color. Fixes: QTBUG-116826 Change-Id: I3837e7ca93a494e60dbe5f1b7f8607b3dd16d29e Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>bb10
parent
11424b3f51
commit
b90b624ce0
|
|
@ -591,8 +591,12 @@ QPalette QWindowsTheme::systemPalette(Qt::ColorScheme colorScheme)
|
|||
result.color(QPalette::Inactive, QPalette::Window));
|
||||
result.setColor(QPalette::Inactive, QPalette::HighlightedText,
|
||||
result.color(QPalette::Inactive, QPalette::Text));
|
||||
result.setColor(QPalette::Inactive, QPalette::Accent,
|
||||
result.color(QPalette::Inactive, QPalette::Window));
|
||||
// Only set this if it hasn't been set.
|
||||
if (!result.isBrushSet(QPalette::Inactive, QPalette::Accent)) {
|
||||
// We set Accent to Window to match the behavior of Windows 11.
|
||||
result.setColor(QPalette::Inactive, QPalette::Accent,
|
||||
result.color(QPalette::Inactive, QPalette::Window));
|
||||
}
|
||||
}
|
||||
|
||||
const QColor disabled = mixColors(result.windowText().color(), result.button().color());
|
||||
|
|
|
|||
Loading…
Reference in New Issue