From 678b0cf6c3753ac72ca5c538cf24d70ff61c725d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lund=20Martsum?= Date: Fri, 29 Jun 2018 08:51:53 +0200 Subject: Remove strange icon highlight for active menu item Windows and macOS do not highlight the icon for an active menu item. It requires quite a few kludges in styles and/or stylesheets to make it behave and we simply should not highlight this icon. [ChangeLog][QtWidgets][QMenu] Removed icon highlight when a stylesheet was applied the application. Task-number: QTBUG-69199 Change-Id: I35c5b255766254d11312d7f86c625b811d1dfd64 Reviewed-by: Morten Kristensen Reviewed-by: Gabriel de Dietrich --- src/widgets/styles/qwindowsstyle.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/styles/qwindowsstyle.cpp b/src/widgets/styles/qwindowsstyle.cpp index 7c9d917784..4b9d0b5adc 100644 --- a/src/widgets/styles/qwindowsstyle.cpp +++ b/src/widgets/styles/qwindowsstyle.cpp @@ -1148,9 +1148,6 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai pixmap = menuitem->icon.pixmap(proxy()->pixelMetric(PM_SmallIconSize, opt, widget), mode); const int pixw = pixmap.width() / pixmap.devicePixelRatio(); const int pixh = pixmap.height() / pixmap.devicePixelRatio(); - if (act && !dis && !checked) - qDrawShadePanel(p, vCheckRect, menuitem->palette, false, 1, - &menuitem->palette.brush(QPalette::Button)); QRect pmr(0, 0, pixw, pixh); pmr.moveCenter(vCheckRect.center()); p->setPen(menuitem->palette.text().color()); -- cgit v1.2.3