diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2023-06-09 19:38:58 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2023-06-09 19:38:58 +0200 |
commit | 805f0a30321a21d268ad1f678cb8d42670b2f03e (patch) | |
tree | e5237d10ce3387d117a850b97d7adf7d0b59578d | |
parent | Try to work around macdeployqt missing packages (diff) | |
download | nheko-805f0a30321a21d268ad1f678cb8d42670b2f03e.tar.xz |
Fix toggle placement in user settings
-rw-r--r-- | resources/qml/pages/UserSettingsPage.qml | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/resources/qml/pages/UserSettingsPage.qml b/resources/qml/pages/UserSettingsPage.qml index fa0f3898..c23606ff 100644 --- a/resources/qml/pages/UserSettingsPage.qml +++ b/resources/qml/pages/UserSettingsPage.qml @@ -33,15 +33,17 @@ Rectangle { spacing: Nheko.paddingMedium + width: scroll.availableWidth anchors.fill: parent anchors.leftMargin: userSettingsDialog.collapsed ? 0 : (userSettingsDialog.width-userSettingsDialog.collapsePoint) * 0.4 + Nheko.paddingLarge anchors.rightMargin: anchors.leftMargin + Repeater { model: UserSettingsModel - Layout.fillWidth:true delegate: GridLayout { + width: scroll.availableWidth columns: collapsed? 1 : 2 rows: collapsed? 2: 1 required property var model @@ -78,7 +80,7 @@ Rectangle { Layout.columnSpan: (model.type == UserSettingsModel.SectionTitle && !userSettingsDialog.collapsed) ? 2 : 1 Layout.preferredHeight: child.height - Layout.preferredWidth: Math.min(child.implicitWidth, child.width || 1000) + Layout.preferredWidth: child.implicitWidth Layout.maximumWidth: model.type == UserSettingsModel.SectionTitle ? Number.POSITIVE_INFINITY : 400 Layout.fillWidth: model.type == UserSettingsModel.SectionTitle || model.type == UserSettingsModel.Options || model.type == UserSettingsModel.Number Layout.rightMargin: model.type == UserSettingsModel.SectionTitle ? 0 : Nheko.paddingMedium @@ -95,9 +97,9 @@ Rectangle { roleValue: UserSettingsModel.Options ComboBox { anchors.right: parent.right - width: Math.min(parent.width, implicitWidth) model: r.model.values currentIndex: r.model.value + width: Math.min(implicitWidth, scroll.availableWidth - Nheko.paddingMedium) onCurrentIndexChanged: r.model.value = currentIndex implicitContentWidthPolicy: ComboBox.WidestTextWhenCompleted @@ -109,7 +111,6 @@ Rectangle { SpinBox { anchors.right: parent.right - width: Math.min(parent.width, implicitWidth) from: model.valueLowerBound to: model.valueUpperBound stepSize: model.valueStep @@ -130,7 +131,6 @@ Rectangle { readonly property int decimals: 2 anchors.right: parent.right - width: Math.min(parent.width, implicitWidth) from: model.valueLowerBound * div to: model.valueUpperBound * div stepSize: model.valueStep * div |