limit width of comboboxes and add bottomPadding

This commit is contained in:
Malte E 2022-02-20 09:45:37 +01:00
parent d941974e35
commit 4f8e6602c4

View file

@ -25,10 +25,9 @@ Rectangle {
palette: Nheko.colors palette: Nheko.colors
ScrollBar.horizontal.visible: false ScrollBar.horizontal.visible: false
anchors.fill: parent anchors.fill: parent
//anchors.margins: Nheko.paddingLarge // padding right of the scrollbar is ugly anyway anchors.topMargin: (collapsed? backButton.height : 0)+Nheko.paddingLarge
anchors.topMargin: (collapsed? backButton.height : 0) + Nheko.paddingMedium leftPadding: collapsed? Nheko.paddingMedium : Nheko.paddingLarge
anchors.leftMargin: collapsed? Nheko.paddingMedium : Nheko.paddingLarge bottomPadding: Nheko.paddingLarge
contentWidth: availableWidth contentWidth: availableWidth
ColumnLayout { ColumnLayout {
@ -82,6 +81,7 @@ Rectangle {
Layout.columnSpan: (model.type == UserSettingsModel.SectionTitle && !userSettingsDialog.collapsed) ? 2 : 1 Layout.columnSpan: (model.type == UserSettingsModel.SectionTitle && !userSettingsDialog.collapsed) ? 2 : 1
Layout.preferredHeight: child.height Layout.preferredHeight: child.height
Layout.preferredWidth: Math.min(child.implicitWidth, child.width || 1000) Layout.preferredWidth: Math.min(child.implicitWidth, child.width || 1000)
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.fillWidth: model.type == UserSettingsModel.SectionTitle || model.type == UserSettingsModel.Options || model.type == UserSettingsModel.Number
Layout.rightMargin: model.type == UserSettingsModel.SectionTitle ? 0 : Nheko.paddingMedium Layout.rightMargin: model.type == UserSettingsModel.SectionTitle ? 0 : Nheko.paddingMedium