Commit 63bd1795 authored by Jan Blackquill's avatar Jan Blackquill 🌈

[kcms/users]: Make sure avatar grid doesn't escape bounds

This adds the column spacing into calculation for determining how many columns there are, preventing certain multiples of window sizes from having too many columns.

BUG: 428899
parent a3ab1b8d
......@@ -256,7 +256,8 @@ SimpleKCM {
rowSpacing: Kirigami.Units.smallSpacing
columnSpacing: Kirigami.Units.smallSpacing
columns: {
return Math.floor((stackSwitcher.width) / (Kirigami.Units.gridUnit * 6))
// subtract gridunit from stackswticher width to roughly compensate for slight overlap on tightly fit grids
return Math.floor((stackSwitcher.width - Kirigami.Units.gridUnit) / ((Kirigami.Units.gridUnit * 6) + picturesColumn.columnSpacing))
}
Layout.fillWidth: true
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment