diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2021-07-13 14:39:38 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2021-07-14 16:17:33 +0200 |
commit | 1ef8188a086c96722f4546ca015cefbe69d7693e (patch) | |
tree | fca5bb486fb84b9c4f8b0a3c214ae30d71dbb18b /src/gui/kernel/qwindowsysteminterface.cpp | |
parent | 1d48572b4ea765cb8d81bf227eabaf907a91e7de (diff) |
Support styled menu icons in otherwise unstyled menu items
For a style sheet that defines a rule for the menu icon, but not for the
item itself, we ignored the icon rule.
Implement a separate rendering path for menu items with an icon.
That rule takes precedence over a rule for menu item check indicators,
as almost all styles reuse the icon for that.
Factor the icon positioning and rendering code out into a private member
function that we can reuse. Reduce amount of local variables to make
the list of arguments for that member reasonable, the bit checks are
cheap enough.
Fixes: QTBUG-73966
Pick-to: 6.2
Change-Id: I64b6f5181e35527d0a163d9633a7414b50319829
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/gui/kernel/qwindowsysteminterface.cpp')
0 files changed, 0 insertions, 0 deletions