Commit f82dd803 authored by Matthieu Gallien's avatar Matthieu Gallien 🎵

no longer uses multi pages but a column with all options

parent cf15494d
......@@ -53,108 +53,73 @@ Window {
}
}
RowLayout {
spacing: 0
Rectangle {
anchors.fill: parent
anchors.margins: 0
ListView {
id: pagesList
Layout.fillHeight: true
Layout.preferredWidth: 150
boundsBehavior: Flickable.StopAtBounds
color: myPalette.window
delegate: ItemDelegate {
text: model.pageName
icon.name: model.iconName
ColumnLayout {
spacing: 0
width: pagesList.width
anchors.fill: parent
onClicked: pagesList.currentIndex = index
Kirigami.Heading {
text: i18n('General')
Layout.leftMargin: 5
Layout.rightMargin: 5
}
model: ListModel {
id: settingsPagesModel
GeneralConfiguration {
Layout.fillWidth: true
Layout.topMargin: 10
Layout.leftMargin: 20
Layout.rightMargin: 10
}
ScrollBar.vertical: ScrollBar {
id: scrollBar
Kirigami.Heading {
text: i18n('Music Search Paths')
Layout.leftMargin: 5
Layout.rightMargin: 5
Layout.topMargin: 15
}
highlight: highlightBar
}
Kirigami.Separator {
Layout.fillHeight: true
}
Rectangle {
Layout.fillHeight: true
Layout.fillWidth: true
color: myPalette.window
ColumnLayout {
spacing: 0
anchors.fill: parent
StackLayout {
Layout.fillWidth: true
Layout.fillHeight: true
Layout.leftMargin: 10
Layout.rightMargin: 10
Layout.topMargin: 10
Layout.bottomMargin: 10
currentIndex: pagesList.currentIndex
FileScanningConfiguration {
Layout.fillWidth: true
Layout.fillHeight: true
Layout.leftMargin: 10
Layout.rightMargin: 10
Layout.topMargin: 10
}
GeneralConfiguration {
}
DialogButtonBox {
Layout.fillWidth: true
FileScanningConfiguration {
}
Button {
text: i18n("OK")
DialogButtonBox.buttonRole: DialogButtonBox.AcceptRole
}
DialogButtonBox {
Layout.fillWidth: true
Button {
text: i18n("Apply")
DialogButtonBox.buttonRole: DialogButtonBox.ApplyRole
Button {
text: i18n("OK")
DialogButtonBox.buttonRole: DialogButtonBox.AcceptRole
}
Button {
text: i18n("Apply")
DialogButtonBox.buttonRole: DialogButtonBox.ApplyRole
enabled: config.isDirty
}
enabled: config.isDirty
}
Button {
text: i18n("Cancel")
DialogButtonBox.buttonRole: DialogButtonBox.RejectRole
}
Button {
text: i18n("Cancel")
DialogButtonBox.buttonRole: DialogButtonBox.RejectRole
}
onAccepted: {
config.save()
close()
}
onAccepted: {
config.save()
close()
}
onApplied: config.save()
onApplied: config.save()
onRejected: close()
}
onRejected: close()
}
}
}
Component.onCompleted: {
settingsPagesModel.insert(0, { "pageName": i18nc("Settings page about main preference", "General"), "iconName": 'settings-configure' })
settingsPagesModel.insert(1, { "pageName": i18nc("Settings page about music search folders configuration", "Music Search Folders"), "iconName": 'folder-music' })
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment