From 6c1cd3471f4a2725819b4aba4bbc58d686a89e08 Mon Sep 17 00:00:00 2001 From: Tommy Date: Fri, 3 Dec 2021 16:55:21 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-62743=20=E6=9C=8D=E5=8A=A1=E5=99=A8?= =?UTF-8?q?=E5=90=AF=E5=8A=A8=E6=A8=A1=E6=80=81=E6=A1=86=E4=BD=8D=E7=BD=AE?= =?UTF-8?q?=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/gui/iprogressbar/ProgressDialog.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/iprogressbar/ProgressDialog.java b/designer-base/src/main/java/com/fr/design/gui/iprogressbar/ProgressDialog.java index d1847545c..3106ebff7 100644 --- a/designer-base/src/main/java/com/fr/design/gui/iprogressbar/ProgressDialog.java +++ b/designer-base/src/main/java/com/fr/design/gui/iprogressbar/ProgressDialog.java @@ -31,22 +31,22 @@ public class ProgressDialog extends UIDialog { super(parent); setUndecorated(true); setSize(parent.getSize()); - setLocationRelativeTo(null); + setLocation(parent.getLocation()); OSSupportCenter.buildAction(new OSBasedAction() { @Override public void execute(Object... objects) { setOpacity(0.5f); } }, SupportOSImpl.OPACITY); - initComponent(); + initComponent(parent); } - private void initComponent() { + private void initComponent(Frame parent) { centerDialog = new JDialog(this); centerDialog.setSize(new Dimension(482, 124)); centerDialog.setUndecorated(true); - GUICoreUtils.centerWindow(centerDialog); + centerDialog.setLocationRelativeTo(parent); JPanel panel = new JPanel(); panel.setBorder(new UIProgressBorder(3, UIConstants.DEFAULT_BG_RULER, 14, 46, 47, 37, 47)); panel.setLayout(new BorderLayout(4, 15));