From f0c353cdf603068e723ca7de39156ee03cae558f Mon Sep 17 00:00:00 2001 From: Android-X13 <76814540+Android-X13@users.noreply.github.com> Date: Mon, 21 Nov 2022 15:16:39 +0200 Subject: [PATCH] Fix overlay centering --- desktop/src/main/java/bisq/desktop/main/overlays/Overlay.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/desktop/src/main/java/bisq/desktop/main/overlays/Overlay.java b/desktop/src/main/java/bisq/desktop/main/overlays/Overlay.java index 7b2394d852d..764e0eda5c0 100644 --- a/desktop/src/main/java/bisq/desktop/main/overlays/Overlay.java +++ b/desktop/src/main/java/bisq/desktop/main/overlays/Overlay.java @@ -727,7 +727,9 @@ protected void layout() { double titleBarHeight = window.getHeight() - rootScene.getHeight(); if (Utilities.isWindows()) titleBarHeight -= 9; - stage.setX(Math.round(window.getX() + (owner.getWidth() - stage.getWidth()) / 2)); + + double windowWidth = Utilities.isWindows() ? window.getWidth() : owner.getWidth(); + stage.setX(Math.round(window.getX() + (windowWidth - stage.getWidth()) / 2)); if (type.animationType == AnimationType.SlideDownFromCenterTop) stage.setY(Math.round(window.getY() + titleBarHeight));