on xenial help sign in
Make sure we always have least have one column in the gridview. Fixes: https://bugs.launchpad.net/bugs/1225391.

Approved by PS Jenkins bot, Michał Sawicz.

commit1d068db93ba58a545ed5d485f68638d0ad3ac54d authorAlbert Astals <albert.astals@canonical.com> dateWed 25 Sep 2013, 01:47 (13 years ago) parent9daf05fa5d8cd6
1 file changed+1−1
Components/ResponsiveGridView.qml+1−1
Components/ResponsiveGridView.qml+1−1
@@ -67,7 +67,7 @@ Item {
6767
6868 function columnsForSpacing(spacing) {
6969 // 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)));
7171 }
7272
7373 property real allocatableHorizontalSpace: parent.width - columns * delegateWidth