on xenial help sign in
Merge branch 'xenial_-_qt-5-12' into xenial_-_qt-5-12_-_wayland
4dc4b35Rodney Dawes
qml/Launcher/DrawerGridView.qml+2−3
@@ -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
36
36
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)
39
39
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)
47− leftMargin: spacing
48 focus: true
47 focus: true
49
48
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)
52
51
53 cellWidth: root.delegateWidth + spacing
52 cellWidth: root.delegateWidth + spacing
54 cellHeight: root.delegateHeight
53 cellHeight: root.delegateHeight