Make the Settings dialog content scrollable
Adding the Org Path group pushed the settings content past the dialog's fixed height, so the lower groups and the Close button overflowed the dialog bounds. Wrap the content ColumnLayout in a ScrollView (vertical only; the inner layout matches the viewport width so Layout.fillWidth children still size correctly) and raise the default height from 400 to 520 so the common case fits without scrolling. Content that still exceeds the dialog now scrolls instead of overflowing.
This commit is contained in:
parent
c4dc18cbfc
commit
2f040bf810
|
|
@ -9,7 +9,7 @@ Dialog {
|
|||
modal: true
|
||||
standardButtons: Dialog.Close
|
||||
width: 450
|
||||
height: 400
|
||||
height: 520
|
||||
|
||||
x: (parent.width - width) / 2
|
||||
y: (parent.height - height) / 2
|
||||
|
|
@ -80,10 +80,20 @@ Dialog {
|
|||
}
|
||||
}
|
||||
|
||||
contentItem: ColumnLayout {
|
||||
spacing: 16
|
||||
contentItem: ScrollView {
|
||||
id: contentScroll
|
||||
clip: true
|
||||
// Only scroll vertically; the inner layout matches the viewport width.
|
||||
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
||||
contentWidth: availableWidth
|
||||
|
||||
// --- Org Path ---
|
||||
ColumnLayout {
|
||||
// Match the scroll viewport width so Layout.fillWidth children size
|
||||
// correctly and no horizontal scrolling is needed.
|
||||
width: contentScroll.availableWidth
|
||||
spacing: 16
|
||||
|
||||
// --- Org Path ---
|
||||
GroupBox {
|
||||
title: qsTr("Org Path")
|
||||
Layout.fillWidth: true
|
||||
|
|
@ -296,17 +306,18 @@ Dialog {
|
|||
}
|
||||
}
|
||||
|
||||
// --- Reset buttons ---
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: 8
|
||||
// --- Reset buttons ---
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: 8
|
||||
|
||||
Button {
|
||||
text: qsTr("Reset Font")
|
||||
onClicked: theme.resetFont()
|
||||
Button {
|
||||
text: qsTr("Reset Font")
|
||||
onClicked: theme.resetFont()
|
||||
}
|
||||
|
||||
Item { Layout.fillWidth: true }
|
||||
}
|
||||
|
||||
Item { Layout.fillWidth: true }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue