summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@qt.io>2022-04-04 14:41:21 +0200
committerTimur Pocheptsov <timur.pocheptsov@qt.io>2022-04-05 15:01:12 +0200
commit306f44a176d82fba521e5072f2116fa17ea8c611 (patch)
treec6e89733c9be0e9d6844c4c6c76079a00c4f3422 /src/plugins/platforms/cocoa
parentb5ed3cb7baeb6d77c375134719ee04ffcc211b9f (diff)
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>
Diffstat (limited to 'src/plugins/platforms/cocoa')
-rw-r--r--src/plugins/platforms/cocoa/qcocoatheme.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoatheme.mm b/src/plugins/platforms/cocoa/qcocoatheme.mm
index 3f5802afbb..3d329f312e 100644
--- a/src/plugins/platforms/cocoa/qcocoatheme.mm
+++ b/src/plugins/platforms/cocoa/qcocoatheme.mm
@@ -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