@@ -78,14 +78,19 @@ DashPreview {
7878 id: buttons
7979 objectName: "gridButtons"
8080 model: root.previewData.actions
81+ interactive: false
8182
82− property int numOfRows: (count + 1) / 2
83+ anchors.left: parent.left
84+ anchors.right: parent.right
85+
86+ property int numOfRows: (count + numOfColumns - 1) / numOfColumns
87+ property int numOfColumns: Math.max(1, Math.floor(width / (buttonWidth + spacing)))
8388 property int spacing: units.gu(1)
8489 height: Math.max(units.gu(4), units.gu(4)*numOfRows + spacing*(numOfRows - 1))
8590
86− cellWidth: Math.max(units.gu(9), width / 2)
87− cellHeight: buttonHeight + spacing
88− property int buttonWidth: Math.max(0, width / 2 - spacing)
91+ cellWidth: width / buttons.numOfColumns
92+ cellHeight: buttonHeight + buttons.spacing
93+ property int buttonWidth: units.gu(17) - spacing
8994 property int buttonHeight: units.gu(4)
9095
9196 delegate: Button {
@@ -160,7 +165,6 @@ DashPreview {
160165 var parts = []
161166 if (ready) {
162167 if (previewData.year) parts.push(previewData.year)
163− //if (nfo.video.runtime) parts.push("%1 minutes".arg(nfo.video.runtime))
164168 }
165169 return parts.join(", ");
166170 }