Created attachment 126583 [details]
Spacing starts out too high
See the attached video.
`git bisect` says this regression was introduced by https://phabricator.kde.org/D27595
The following bugs seem related:
*** Bug 418534 has been marked as a duplicate of this bug. ***
*** Bug 418535 has been marked as a duplicate of this bug. ***
Git commit b738ebbb6369e4c1d9705b4e0c6e0fba4f96bd5d by Kai Uwe Broulik.
Committed on 18/03/2020 at 09:09.
Pushed by broulik into branch 'master'.
Fix sizing of CheckBox and RadioButton
KQuickStyleItem manages its implicit size internally. Overriding it on the QML side makes it non-deterministic
which assignment wins and might cause unexpected re-evaluation of the size causing it to change.
Moreover, the CheckIndicator implicit size is based on sizeFromContents for CT_CheckBox, which in case of Breeze
(but not the Qt built-in styles) already contains some extra padding on the side between checkbox and label.
Instead of using that for layouting our full checkbox (indicator + label), do what qqc1 did and use
PM_CheckBoxLabelSpacing for spacing and PM_IndicatorWidth as size hint for the indicator.
Also while at it for radio buttons use the appropriate (PM_RadioButtonLabelSpacing and PM_ExclusiveIndicatorWidth) hints.
This makes QQC2 CheckBox and RadioButton layouted pixel-perfect to their QWidget counterparts and also fixes
it randomly changing size hints as you switch between pages as demonstrated by the bug report.
Differential Revision: https://phabricator.kde.org/D28116
M +6 -5 org.kde.desktop/CheckBox.qml
M +0 -3 org.kde.desktop/CheckIndicator.qml
M +6 -5 org.kde.desktop/RadioButton.qml
M +6 -0 plugin/kquickstyleitem.cpp
This patch also fixes bug 417438 and bug 407464 on Neon unstable.
*** Bug 407464 has been marked as a duplicate of this bug. ***
*** Bug 417438 has been marked as a duplicate of this bug. ***
Bug 418966 could be a duplicate.
*** Bug 418966 has been marked as a duplicate of this bug. ***
Yep, same issue. Thanks!