QCocoaTheme: use NSColor.controlAccentColor for QMenu items
The highligh color we have looks too different to what system menus have. Accent color seems to be better matching this color, though it's not really what we can see in menus, which are transparent and blend with watever lies below them. Fixes: QTBUG-75386 Change-Id: I03f66808eb885594862ad9b31398cae4ca186593 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
b5ed3cb7ba
commit
306f44a176
@ -205,7 +205,7 @@ static QHash<QPlatformTheme::Palette, QPalette*> qt_mac_createRolePalettes()
|
||||
NSColor *selectedMenuItemColor = nil;
|
||||
if (__builtin_available(macOS 10.14, *)) {
|
||||
// Cheap approximation for NSVisualEffectView (see deprecation note for selectedMenuItemTextColor)
|
||||
selectedMenuItemColor = [[NSColor selectedContentBackgroundColor] highlightWithLevel:0.4];
|
||||
selectedMenuItemColor = [[NSColor controlAccentColor] highlightWithLevel:0.3];
|
||||
} else {
|
||||
// selectedMenuItemColor would presumably be the correct color to use as the background
|
||||
// for selected menu items. But that color is always blue, and doesn't follow the
|
||||
|
Loading…
Reference in New Issue
Block a user