Compare commits

...

1 Commits

Author SHA1 Message Date
Carl Schwan
6a062f8955 Fix call to undefined restoreWindowGeometry
Simply remove it, a proper solution would be to expose WindowsController
to qml and then call the replacement for that but none seems to care
about the tray support and I wish we could drop it.

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2023-09-12 15:40:00 +00:00

View File

@@ -160,13 +160,32 @@ Kirigami.ApplicationWindow {
Component.onCompleted: {
Controller.setBlur(pageStack, Config.blur && !Config.compactLayout);
if (Config.minimizeToSystemTrayOnStartup && !Kirigami.Settings.isMobile && Controller.supportSystemTray && Config.systemTray) {
restoreWindowGeometryConnections.enabled = true; // To restore window size and position
if (Config.minimizeToSystemTrayOnStartup && !Kirigami.Settings.isMobile
&& Controller.supportSystemTray && Config.systemTray) {
// To restore window size and position
restoreWindowGeometryConnections.enabled = true;
} else {
visible = true;
saveWindowGeometryConnections.enabled = true;
}
}
Connections {
id: restoreWindowGeometryConnections
enabled: false
target: root
function onVisibleChanged() {
if (!visible) {
return;
}
// Only restore window geometry for the first time
restoreWindowGeometryConnections.enabled = false;
saveWindowGeometryConnections.enabled = true;
}
}
Connections {
target: Config
function onBlurChanged() {
@@ -184,7 +203,7 @@ Kirigami.ApplicationWindow {
background: Rectangle {
color: Config.blur && !Config.compactLayout ? Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 1 - Config.transparency) : "transparent"
}
Component {
id: roomListComponent
RoomList.Page {
@@ -259,21 +278,6 @@ Kirigami.ApplicationWindow {
}
}
Connections {
id: restoreWindowGeometryConnections
enabled: false
target: root
function onVisibleChanged() {
if (!visible) {
return;
}
Controller.restoreWindowGeometry(root);
restoreWindowGeometryConnections.enabled = false; // Only restore window geometry for the first time
saveWindowGeometryConnections.enabled = true;
}
}
Component {
id: keyVerificationDialogComponent
KeyVerificationDialog { }