From 5a8669993d40efab2c2b0bb3e9fd9ef0b19285b0 Mon Sep 17 00:00:00 2001 From: vito Date: Tue, 14 Aug 2018 11:40:36 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-9518=20=E5=90=AF=E5=8A=A8=E5=8A=A8?= =?UTF-8?q?=E7=94=BB=E7=95=8C=E9=9D=A2=E5=81=B6=E5=B0=94=E5=AD=97=E4=BD=93?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/start/fx/SplashFxWindow.java | 20 +++++++------------ 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/start/fx/SplashFxWindow.java b/designer-realize/src/main/java/com/fr/start/fx/SplashFxWindow.java index e86384669..1b3e986af 100644 --- a/designer-realize/src/main/java/com/fr/start/fx/SplashFxWindow.java +++ b/designer-realize/src/main/java/com/fr/start/fx/SplashFxWindow.java @@ -30,8 +30,6 @@ import java.util.concurrent.CountDownLatch; */ public class SplashFxWindow extends Application { - private static float JBUI_INIT_SCALE = JBUI.scale(1f); - private static final String ARIAL_FONT_NAME = "Arial"; private static final String PF_FONT_NAME = "PingFang"; private static final String YAHEI_FONT_NAME = "Microsoft YaHei"; @@ -53,10 +51,6 @@ public class SplashFxWindow extends Application { private FastGifImage image; private List listeners = new ArrayList(); - private static int uiScale(int i) { - return (int) (i * JBUI_INIT_SCALE); - } - /** * 获取当前运行实例。黑科技 * @@ -94,23 +88,23 @@ public class SplashFxWindow extends Application { AnchorPane.setRightAnchor(gif, 0d); Font font; if (OperatingSystem.isWindows()) { - font = new Font(YAHEI_FONT_NAME, uiScale(FONT)); + font = new Font(YAHEI_FONT_NAME, FONT); } else if (OperatingSystem.isMacOS()) { - font = new Font(PF_FONT_NAME, uiScale(FONT)); + font = new Font(PF_FONT_NAME, FONT); } else { - font = new Font(ARIAL_FONT_NAME, uiScale(FONT)); + font = new Font(ARIAL_FONT_NAME, FONT); } moduleInfo = new Text(); moduleInfo.setFont(font); moduleInfo.setFill(Color.WHITE); - AnchorPane.setLeftAnchor(moduleInfo, (double) uiScale(MODULE_INFO_LEFT_MARGIN)); - AnchorPane.setBottomAnchor(moduleInfo, (double) uiScale(MODULE_INFO_BOTTOM_MARGIN)); + AnchorPane.setLeftAnchor(moduleInfo,(double) MODULE_INFO_LEFT_MARGIN); + AnchorPane.setBottomAnchor(moduleInfo,(double) MODULE_INFO_BOTTOM_MARGIN); thanks = new Text(); thanks.setFont(font); thanks.setFill(Color.valueOf(THINKS_COLOR)); - AnchorPane.setRightAnchor(thanks, (double) uiScale(THINKS_BOTTOM_RIGHT)); - AnchorPane.setBottomAnchor(thanks, (double) uiScale(THINKS_BOTTOM_MARGIN)); + AnchorPane.setRightAnchor(thanks, (double) THINKS_BOTTOM_RIGHT); + AnchorPane.setBottomAnchor(thanks, (double) THINKS_BOTTOM_MARGIN); root.getChildren().add(gif); root.getChildren().add(moduleInfo);