From 306f44a176d82fba521e5072f2116fa17ea8c611 Mon Sep 17 00:00:00 2001 From: Timur Pocheptsov Date: Mon, 4 Apr 2022 14:41:21 +0200 Subject: [PATCH] QCocoaTheme: use NSColor.controlAccentColor for QMenu items MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ø --- src/plugins/platforms/cocoa/qcocoatheme.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/platforms/cocoa/qcocoatheme.mm b/src/plugins/platforms/cocoa/qcocoatheme.mm index 3f5802afbbe..3d329f312ec 100644 --- a/src/plugins/platforms/cocoa/qcocoatheme.mm +++ b/src/plugins/platforms/cocoa/qcocoatheme.mm @@ -205,7 +205,7 @@ static QHash 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