@@ -34,7 +34,7 @@ FocusScope {
34 property alias topMargin: gridView.topMargin
34 property alias topMargin: gridView.topMargin
35 property alias bottomMargin: gridView.bottomMargin
35 property alias bottomMargin: gridView.bottomMargin
37− readonly property int columns: width / delegateWidth
37+ readonly property int columns: Math.floor(width / delegateWidth)
38 readonly property int rows: Math.ceil(gridView.model.count / root.columns)
38 readonly property int rows: Math.ceil(gridView.model.count / root.columns)
40 property alias refreshing: pullToRefresh.refreshing
40 property alias refreshing: pullToRefresh.refreshing
@@ -44,11 +44,10 @@ FocusScope {
44 id: gridView
44 id: gridView
45 anchors.fill: parent
45 anchors.fill: parent
46 anchors.topMargin: units.gu(2)
46 anchors.topMargin: units.gu(2)
48 focus: true
47 focus: true
50 readonly property int overflow: width - (root.columns * root.delegateWidth)
49 readonly property int overflow: width - (root.columns * root.delegateWidth)
51− readonly property real spacing: overflow / (root.columns)
50+ readonly property real spacing: Math.ceil(overflow / root.columns)
53 cellWidth: root.delegateWidth + spacing
52 cellWidth: root.delegateWidth + spacing
54 cellHeight: root.delegateHeight
53 cellHeight: root.delegateHeight