Ensure file activity dialog appears in centre of screen
authorClaudio Cambra <claudio.cambra@gmail.com>
Thu, 3 Mar 2022 12:33:20 +0000 (13:33 +0100)
committerMatthieu Gallien (Rebase PR Action) <matthieu_gallien@yahoo.fr>
Sun, 13 Mar 2022 22:11:26 +0000 (22:11 +0000)
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
src/gui/tray/FileActivityDialog.qml

index 50452b0f3cbaff374b70ce745aaf7b83dc6c4086..785d458063ece024593db8d86dea4fda75f9474d 100644 (file)
@@ -1,3 +1,4 @@
+import QtQuick 2.15
 import QtQuick.Window 2.15
 
 import com.nextcloud.desktopclient 1.0 as NC
@@ -19,4 +20,10 @@ Window {
         anchors.fill: parent
         model: dialog.model
     }
+
+    Component.onCompleted: {
+        // Set this explicitly, otherwise on macOS it will appear behind the tray
+        x = screen.width / 2 - width / 2
+        y = screen.height / 2 - height / 2
+    }
 }