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

@@ -41,6 +41,7 @@ Kirigami.ApplicationWindow {
onConnectionChanged: {
CustomEmojiModel.connection = root.connection;
SpaceHierarchyCache.connection = root.connection;
NeoChatSettingsView.connection = root.connection;
if (ShareHandler.text && root.connection) {
root.handleShare();
}
@@ -190,6 +191,9 @@ Kirigami.ApplicationWindow {
Component.onCompleted: {
CustomEmojiModel.connection = root.connection;
SpaceHierarchyCache.connection = root.connection;
RoomSettingsView.window = root;
NeoChatSettingsView.window = root;
NeoChatSettingsView.connection = root.connection;
WindowController.setBlur(pageStack, Config.blur && !Config.compactLayout);
if (ShareHandler.text && root.connection) {
root.handleShare()
@@ -321,15 +325,10 @@ Kirigami.ApplicationWindow {
Shortcut {
sequence: "Ctrl+Shift+,"
onActivated: {
pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat.settings', 'NeoChatSettings'), {
connection: root.connection
}, {
title: i18n("Configure"),
width: Kirigami.Units.gridUnit * 50,
height: Kirigami.Units.gridUnit * 42
});
NeoChatSettingsView.open();
}
}
Connections {
target: ShareHandler
function onTextChanged(): void {