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: { Component.onCompleted: {
Controller.setBlur(pageStack, Config.blur && !Config.compactLayout); Controller.setBlur(pageStack, Config.blur && !Config.compactLayout);
if (Config.minimizeToSystemTrayOnStartup && !Kirigami.Settings.isMobile && Controller.supportSystemTray && Config.systemTray) { if (Config.minimizeToSystemTrayOnStartup && !Kirigami.Settings.isMobile
restoreWindowGeometryConnections.enabled = true; // To restore window size and position && Controller.supportSystemTray && Config.systemTray) {
// To restore window size and position
restoreWindowGeometryConnections.enabled = true;
} else { } else {
visible = true; visible = true;
saveWindowGeometryConnections.enabled = 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 { Connections {
target: Config target: Config
function onBlurChanged() { function onBlurChanged() {
@@ -184,7 +203,7 @@ Kirigami.ApplicationWindow {
background: Rectangle { 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" color: Config.blur && !Config.compactLayout ? Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 1 - Config.transparency) : "transparent"
} }
Component { Component {
id: roomListComponent id: roomListComponent
RoomList.Page { 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 { Component {
id: keyVerificationDialogComponent id: keyVerificationDialogComponent
KeyVerificationDialog { } KeyVerificationDialog { }