diff --git a/src/Qt5/imports/FluentUI/Controls/FluWindow.qml b/src/Qt5/imports/FluentUI/Controls/FluWindow.qml index 79631494..72d2ec8f 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluWindow.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluWindow.qml @@ -175,13 +175,19 @@ Window { id:layout_container property int offsetX: { if(window.visibility === Window.Maximized){ - return Math.abs(window.x-Screen.virtualX) + var dx = window.x-Screen.virtualX + if(dx<0){ + return Math.abs(dx) + } } return 0 } property int offsetY: { if(window.visibility === Window.Maximized){ - return Math.abs(window.y-Screen.virtualY) + var dy = window.y-Screen.virtualY + if(dy<0){ + return Math.abs(dy) + } } return 0 } diff --git a/src/Qt6/imports/FluentUI/Controls/FluWindow.qml b/src/Qt6/imports/FluentUI/Controls/FluWindow.qml index f39e48d8..0442323b 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluWindow.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluWindow.qml @@ -174,13 +174,19 @@ Window { id:layout_container property int offsetX: { if(window.visibility === Window.Maximized){ - return Math.abs(window.x-Screen.virtualX) + var dx = window.x-Screen.virtualX + if(dx<0){ + return Math.abs(dx) + } } return 0 } property int offsetY: { if(window.visibility === Window.Maximized){ - return Math.abs(window.y-Screen.virtualY) + var dy = window.y-Screen.virtualY + if(dy<0){ + return Math.abs(dy) + } } return 0 }