From 68641cf6b98fa57079b658cebc5a1ead1f6160ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20Gro=C3=9F?= Date: Sat, 13 Jan 2024 01:03:40 +0100 Subject: [PATCH] Fix spacing in join dialog --- src/qml/Main.qml | 1 + src/qml/Settings.qml | 51 +++++++++++++++++++++++--------------------- 2 files changed, 28 insertions(+), 24 deletions(-) diff --git a/src/qml/Main.qml b/src/qml/Main.qml index bab2441..80b8701 100644 --- a/src/qml/Main.qml +++ b/src/qml/Main.qml @@ -199,6 +199,7 @@ ApplicationWindow { } Column { width: 150 + spacing: 8 TextField { id: nameTextField anchors.left: parent.left diff --git a/src/qml/Settings.qml b/src/qml/Settings.qml index 7f80032..e32e333 100644 --- a/src/qml/Settings.qml +++ b/src/qml/Settings.qml @@ -10,7 +10,8 @@ Page { title: "Settings" TabBar { id: bar - width: parent.width + anchors.left: parent.left + anchors.right: closeButton.left TabButton { text: "General" } @@ -19,6 +20,9 @@ Page { } } IconButton { + id: closeButton + anchors.right: parent.right + anchors.top: parent.top ico.name: "close" onClicked: pageStack.clear(); } @@ -99,30 +103,29 @@ Page { id: itemListView anchors.fill: parent model: ItemModel - delegate: Item { - height: 108 - RowLayout { - IconButton { - ico.name: model.iconName - } - Label { - text: model.name + " (" + model.description + ")" - } - Slider { - id: probabilitySlider - value: model.probability - onValueChanged: ItemModel.setProbability(index, value); - } - ComboBox { - model: ListModel { - ListElement { name: "Allow all" } - ListElement { name: "Allow others" } - ListElement { name: "Allow collector" } - } - width: probabilitySlider.width - currentIndex: allowedUsers - onCurrentIndexChanged: ItemModel.setAllowedUsers(index, currentIndex); + delegate: RowLayout { + width: parent.width + IconButton { + ico.name: model.iconName + } + Label { + text: model.name + " (" + model.description + ")" + Layout.fillWidth: true + } + Slider { + id: probabilitySlider + value: model.probability + onValueChanged: ItemModel.setProbability(index, value); + } + ComboBox { + model: ListModel { + ListElement { name: "Allow all" } + ListElement { name: "Allow others" } + ListElement { name: "Allow collector" } } + implicitWidth: 160 + currentIndex: allowedUsers + onCurrentIndexChanged: ItemModel.setAllowedUsers(index, currentIndex); } } }