on xenial help sign in
Make sure we always have least have one column in the gridview
a5d8cd6Albert Astals
Components/ResponsiveGridView.qml+1−1
@@ -67,7 +67,7 @@ Item {
67
67
68 function columnsForSpacing(spacing) {
68 function columnsForSpacing(spacing) {
69 // minimum margin is half of the spacing
69 // minimum margin is half of the spacing
70− return Math.floor((parent.width - spacing/2) / (delegateWidth + spacing));
70+ return Math.max(1, Math.floor((parent.width - spacing/2) / (delegateWidth + spacing)));
71 }
71 }
72
72
73 property real allocatableHorizontalSpace: parent.width - columns * delegateWidth
73 property real allocatableHorizontalSpace: parent.width - columns * delegateWidth