@@ -67,13 +67,15 @@ DashPreview {
6767 id: buttons
6868 model: genericPreview.previewData.actions
6969
70− property int numOfRows: (count + 1) / 2
70+ property int buttonMaxWidth: units.gu(34)
71+ property int numOfColumns: Math.ceil((width + spacing) / (buttonMaxWidth + spacing))
72+ property int numOfRows: Math.ceil(count / numOfColumns)
7173 property int spacing: units.gu(1)
7274 height: Math.max(units.gu(4), units.gu(4)*numOfRows + spacing*(numOfRows - 1))
7375
74− cellWidth: Math.max(units.gu(9), width / 2)
76+ cellWidth: width / numOfColumns
7577 cellHeight: buttonHeight + spacing
76− property int buttonWidth: Math.max(0, width / 2 - spacing)
78+ property int buttonWidth: cellWidth - spacing / 2
7779 property int buttonHeight: units.gu(4)
7880
7981 delegate: Button {