Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.12, 5.15.10, 6.3.1
-
None
-
macOS 11.6.8
Description
Steps to reproduce
- Compile and run the attached example on Mac (see some instructions I followed in README.txt)
- You'll see a widget containing two spin boxes: one spin box has the WA_MacSmallSize attribute set, the other one not.
- Look at the position of the step buttons.
- EXPECTED: The step buttons all the spin boxes are positioned properly (some white space + vertically aligned with the center of the edit field).
- ACTUAL: The step buttons of the spin box with the WA_MacSmallSize attribute set are not positioned nicely.
Also reproducible with...
- QDoubleSpinBox
- WA_MacMiniSize
Some more details
In qmacstyle_mac.mm, the function QMacStyle::subControlRect contains a section for spin boxes. Somewhere between Qt 5.9 and Qt 5.12 a hack was introduced with the comment "
// hack: position the buttons correctly (weird that we need this)
This hack seems to be broken on my current Mac version (11.6.8). If I tweak this code a bit (see the .patch file in the attachment) I can fix the alignment issues. Not sure though if these tweaking is ok in general. In any case it is better to address the root cause and fix the hack in the first place.