From 2ab95a30f9e6289469d17047bc527f3338f94b16 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Tue, 16 Aug 2022 16:52:21 +0200 Subject: [PATCH] Ensure file activity dialog is centered on screen and appears at top of window stack Signed-off-by: Claudio Cambra --- src/gui/tray/FileActivityDialog.qml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/gui/tray/FileActivityDialog.qml b/src/gui/tray/FileActivityDialog.qml index 58264ef28..b2d5fb809 100644 --- a/src/gui/tray/FileActivityDialog.qml +++ b/src/gui/tray/FileActivityDialog.qml @@ -30,8 +30,11 @@ Window { } 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 + Systray.forceWindowInit(dialog); + Systray.positionWindowAtScreenCenter(dialog); + + dialog.show(); + dialog.raise(); + dialog.requestActivate(); } }