From 898fac07ec5f2aba1e09bb77b873a59c5bd29d14 Mon Sep 17 00:00:00 2001 From: Papoteur Date: Sat, 16 Feb 2019 07:40:31 +0100 Subject: Buttonbox: Better Layout (mga#24200) --- qml/mw-ui.qml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'qml') diff --git a/qml/mw-ui.qml b/qml/mw-ui.qml index c47d94f..785564e 100644 --- a/qml/mw-ui.qml +++ b/qml/mw-ui.qml @@ -937,29 +937,30 @@ This is a background process and you will be able to use your computer normally width: banner.width; height: buttonRow.height anchors { top: banner.bottom; } color: "#262F45" - RowLayout { id: buttonRow + Rectangle { + Layout.preferredWidth: 8 + Layout.preferredHeight: buttonbox.height + color: buttonbox.color + } + Repeater { model: itemModel.count Button { Layout.fillHeight: true - Layout.preferredWidth: banner.width/8-15; + Layout.preferredWidth: (buttonbox.width - 8)/8-9; Layout.topMargin: 6 - Layout.leftMargin: 4 - Layout.rightMargin: 4 Layout.bottomMargin: 6 - //Layout.alignment: Qt.AlignHCenter style: ButtonStyle { background: Rectangle { radius: 5 color: view.currentIndex == index ? "#2397D4" : "white" } label: Label{ - //anchors.verticalCenter: parent.verticalCenter text: itemModel.get(index).title font.pointSize: 9 color: view.currentIndex == index ? "white" : "#262F45" -- cgit v1.2.1