Rework config dialog

Use new KirigamiAddons ConfigurationsView as a replacement for
CategorizedSettings. Fix some issues on desktop when running Qt 6.8
and some less recent issues on mobile.

Visually this looks the same.
This commit is contained in:
Carl Schwan
2024-05-31 12:33:00 +02:00
parent 1460132772
commit a15a11f44b
17 changed files with 271 additions and 302 deletions

View File

@@ -28,7 +28,7 @@ FormCard.FormCardPage {
id: intialAccountTimer
interval: 10
running: false
onTriggered: applicationWindow().pageStack.layers.push(Qt.createComponent('org.kde.neochat.settings', 'AccountEditorPage'), {
onTriggered: root.QQC2.ApplicationWindow.window.pageStack.layers.push(Qt.createComponent('org.kde.neochat.settings', 'AccountEditorPage'), {
connection: initialAccount
}, {
title: i18n("Account editor")
@@ -45,7 +45,7 @@ FormCard.FormCardPage {
id: accountDelegate
required property NeoChatConnection connection
Layout.fillWidth: true
onClicked: applicationWindow().pageStack.layers.push(Qt.createComponent('org.kde.neochat.settings', 'AccountEditorPage'), {
onClicked: root.QQC2.ApplicationWindow.window.pageStack.layers.push(Qt.createComponent('org.kde.neochat.settings', 'AccountEditorPage'), {
connection: accountDelegate.connection
}, {
title: i18n("Account editor")
@@ -87,7 +87,7 @@ FormCard.FormCardPage {
QQC2.ToolButton {
text: i18n("Logout")
icon.name: "im-kick-user"
onClicked: confirmLogoutDialogComponent.createObject(applicationWindow().overlay).open()
onClicked: confirmLogoutDialogComponent.createObject(root.QQC2.Overlay.overlay).open()
}
Component {
@@ -117,7 +117,7 @@ FormCard.FormCardPage {
id: addAccountDelegate
text: i18n("Add Account")
icon.name: "list-add"
onClicked: applicationWindow().pageStack.layers.push(Qt.createComponent('org.kde.neochat.login', 'WelcomePage'))
onClicked: root.QQC2.ApplicationWindow.window.pageStack.layers.push(Qt.createComponent('org.kde.neochat.login', 'WelcomePage'))
}
}