From 7be14d3d2d6c1447d0e384d00f38a8e22f3488a0 Mon Sep 17 00:00:00 2001 From: vito Date: Fri, 15 Sep 2017 00:51:06 +0800 Subject: [PATCH] =?UTF-8?q?bugfix:=E9=9D=9Eretina=E7=BC=A9=E6=94=BE?= =?UTF-8?q?=E6=97=B6=E6=96=87=E5=AD=97=E4=BD=8D=E7=BD=AE=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/start/ReportSplashPane.java | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/designer/src/com/fr/start/ReportSplashPane.java b/designer/src/com/fr/start/ReportSplashPane.java index a1e9b578b4..84a7e10ce2 100644 --- a/designer/src/com/fr/start/ReportSplashPane.java +++ b/designer/src/com/fr/start/ReportSplashPane.java @@ -1,9 +1,7 @@ -/** - * - */ package com.fr.start; import com.bulenkov.iconloader.IconLoader; +import com.bulenkov.iconloader.util.JBUI; import com.fr.base.BaseUtils; import com.fr.base.FRContext; import com.fr.base.GraphHelper; @@ -32,12 +30,14 @@ public class ReportSplashPane extends SplashPane { private static final String SPLASH_MAC_CN = "splash_chinese_mac.png"; private static final String SPLASH_MAC_EN = "splash_english_mac.png"; + private static float JBUI_INIT_SCALE = JBUI.scale(1f); + private static final Color MODULE_COLOR = new Color(255, 255, 255); - private static final int MODULE_INFO_X = 54; - private static final int MODULE_INFO_Y = 340; + private static final int MODULE_INFO_X = uiScale(54); + private static final int MODULE_INFO_Y = uiScale(340); private static final Color THANK_COLOR = new Color(255, 255, 255, (int) (0.4 * 255 + 0.5)); - private static final int THANK_INFO_Y = 382; + private static final int THANK_INFO_Y = uiScale(382); private static final String GUEST = getRandomUser(); @@ -48,6 +48,14 @@ public class ReportSplashPane extends SplashPane { private String[] loading = new String[]{"..", "....", "......"}; private java.util.Timer timer = new java.util.Timer(); + private static float uiScale(float f) { + return f * JBUI_INIT_SCALE; + } + + private static int uiScale(int i) { + return (int) (i * JBUI_INIT_SCALE); + } + public ReportSplashPane() { init(); }