An implicitHeight must be set on QML components to prevent window size being too small.
BUG: 400355
FIXED-IN: 5.16.0
An implicitHeight must be set on QML components to prevent window size being too small.
BUG: 400355
FIXED-IN: 5.16.0
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
Good fix, the lack of implicitHeight was leading to confusion before if there are even any wallpapers present.
One question though: wouldn't it be better to define the height in units.gridUnit instead of raw pixels, or even absolutely by doubling the height of one grid item? From my understanding, when scaling is changed the grid items are also resized so the window won't open showing 2 rows of wallpapers anymore, as was desired.
@filipf Here's a diff with units.gridUnit https://phabricator.kde.org/differential/diff/54998/ which doesn't quite work out to 2 rows for every scaling factor but is a bit better than hard-coded pixel size. I'm not sure how to do doubling the height of one grid item.
Hardcoding pixel size won't impact scaling.
You will never get it spot on two rows with any combination of pixel size or units or whatever you add here. The correct size is dependent on the exact children.
The only way you'll get it to be correct is to bind this stack view to currentItem.implicitHeight and making sure that the implicit size propagates upwards correctly.
@tigrang would you like this landed now, or do you wanna try @davidedmundson's idea?
Thanks for the patch!
Let's land this now and then you can try the other approach in another patch (if you want to).
@ngraham Sorry for the late response.
Let's land this now and then you can try the other approach in another patch (if you want to).
Sounds good.