From 95a6be3d289846a9fbb690f70d6a3019d1e98d71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E5=AD=90=E6=A5=9A=5Czhuzi?= Date: Sat, 2 Dec 2023 22:48:41 +0800 Subject: [PATCH] fix bug #361 --- src/Qt5/imports/FluentUI/Controls/FluWindow.qml | 3 +-- src/Qt6/imports/FluentUI/Controls/FluWindow.qml | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Qt5/imports/FluentUI/Controls/FluWindow.qml b/src/Qt5/imports/FluentUI/Controls/FluWindow.qml index 55931514..c3611db4 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluWindow.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluWindow.qml @@ -304,8 +304,7 @@ Window { return lifecycle.createRegister(window,path) } function moveWindowToDesktopCenter(){ - window.x = (Screen.desktopAvailableWidth - window.width)/2 - window.y = (Screen.desktopAvailableHeight - window.height)/2 + return framless_helper.moveWindowToDesktopCenter() } function onResult(data){ if(_pageRegister){ diff --git a/src/Qt6/imports/FluentUI/Controls/FluWindow.qml b/src/Qt6/imports/FluentUI/Controls/FluWindow.qml index 3ce0f0ba..b3855535 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluWindow.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluWindow.qml @@ -303,8 +303,7 @@ Window { return lifecycle.createRegister(window,path) } function moveWindowToDesktopCenter(){ - window.x = (Screen.desktopAvailableWidth - window.width)/2 - window.y = (Screen.desktopAvailableHeight - window.height)/2 + return framless_helper.moveWindowToDesktopCenter() } function onResult(data){ if(_pageRegister){