Priority: P2: Important
Affects Version/s: 5.15.0
Fix Version/s: None
Component/s: Widgets: Style Sheets
There has been a change in a styled QMenu on Windows after Qt 5,11,3 that has broken the layout of our menus. I've attached a sample program that shows the difference,
On 'menus_5_11_3' you can see how the menus used to look.
We're using a proxy style with custom graphics for the menu Indicator. I've tried to include the relevant parts in my example.
Starting with Qt 5.12.0 the padding seems to be applied after the checkbox. See 'menus_5_15_0'. This is how it looks in the current version.
If you take out the padding, the menus look like 'menus_5_15_0_no_padding'. To achieve that, comment out the QMenu::item styling in stylesheet.qss.
Here it looks like the space for the custom indicator is not correctly reserved. You can see that the checkbox in 'menu 2' is really small. In 'menu 1' the size is ok but only because the reserved space seems to be dermined by the QAction with a custom icon.
I've not been able to find a workaround to get the behavior of 5.11.3 and prior back. It seems to be caused by the changes made for
When I revert the changes in qstylesheetstyle.cpp made for this ticket, I get the old behavior back. I've attached those changes as 'menus.diff' for reference.