From 1f23a69f4103b9bb451f0a7adafe212ca32f425d Mon Sep 17 00:00:00 2001 From: Harrison Date: Thu, 24 Nov 2022 18:00:51 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-85293=E3=80=90=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E3=80=91=E8=B5=B7=E5=A7=8B=E9=A1=B5=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=BD=BD=E8=BF=9B=E5=BA=A6=E6=9D=A1=E8=A7=86?= =?UTF-8?q?=E8=A7=89=E6=95=88=E6=9E=9C=E7=A1=AE=E8=AE=A4=20=E5=85=A8?= =?UTF-8?q?=E5=B1=8F=E6=95=88=E6=9E=9C=E5=9C=A8=20windows=20=E4=B8=8A?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E5=A4=84=E7=90=86=E4=B8=80=E4=B8=8B=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/startup/ui/StartupPageWindow.java | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/designer-base/src/main/java/com/fr/startup/ui/StartupPageWindow.java b/designer-base/src/main/java/com/fr/startup/ui/StartupPageWindow.java index 6c2f4ba91f..41cd758905 100644 --- a/designer-base/src/main/java/com/fr/startup/ui/StartupPageWindow.java +++ b/designer-base/src/main/java/com/fr/startup/ui/StartupPageWindow.java @@ -11,12 +11,14 @@ import com.fr.design.layout.VerticalFlowLayout; import com.fr.design.ui.util.UIUtil; import com.fr.design.utils.ColorUtils; import com.fr.design.utils.ThemeUtils; +import com.fr.design.utils.gui.GUICoreUtils; import com.fr.exit.DesignerExiter; import com.fr.general.GeneralUtils; import com.fr.general.IOUtils; import com.fr.log.FineLoggerFactory; import com.fr.stable.ProductConstants; import com.fr.stable.collections.CollectionUtils; +import com.fr.stable.os.OperatingSystem; import com.fr.start.common.DesignerStartupContext; import com.fr.startup.metric.DesignerMetrics; import org.jetbrains.annotations.NotNull; @@ -56,9 +58,6 @@ import java.util.Map; **/ public class StartupPageWindow extends JFrame { - private static final int CONTENT_LAYER = 0; - private static final int TRANSPARENT_LAYER = 1; - private static final Color HOVER_COLOR = new Color(65, 155, 249); private static final Color SEP_COLOR = new Color(224, 224, 225); @@ -176,11 +175,18 @@ public class StartupPageWindow extends JFrame { return headerPanel; } + /** + * 1-mac启动时全屏 + * 2-windows 则居中处理 + */ private void setFullScreen() { - - Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize(); - this.setLocation(0, 0); - this.setSize(screenSize.width, screenSize.height); + + if (OperatingSystem.isMacos()) { + this.setLocation(0, 0); + this.setSize(SCREEN_SIZE.width, SCREEN_SIZE.height); + } else { + GUICoreUtils.setWindowFullScreen(this); + } } private void addDefaultListeners() {