From b70f81084b8eff6bdcceeba4ff5c302e3b203134 Mon Sep 17 00:00:00 2001 From: vito Date: Fri, 15 Sep 2017 13:50:45 +0800 Subject: [PATCH 1/2] =?UTF-8?q?bugfix:window=E4=B8=8B=E5=AD=97=E4=BD=93?= =?UTF-8?q?=E6=A8=A1=E7=B3=8A=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/start/ReportSplashPane.java | 26 +++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/designer/src/com/fr/start/ReportSplashPane.java b/designer/src/com/fr/start/ReportSplashPane.java index 84a7e10ce..4ec15fc89 100644 --- a/designer/src/com/fr/start/ReportSplashPane.java +++ b/designer/src/com/fr/start/ReportSplashPane.java @@ -9,6 +9,7 @@ import com.fr.design.mainframe.bbs.BBSConstants; import com.fr.general.GeneralContext; import com.fr.general.Inter; import com.fr.general.ModuleContext; +import com.fr.stable.OperatingSystem; import com.fr.stable.StableUtils; import com.fr.stable.StringUtils; import com.fr.stable.module.ModuleAdapter; @@ -36,9 +37,12 @@ public class ReportSplashPane extends SplashPane { 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 Color THANK_COLOR = new Color(255, 255, 255, (int) (0.6 * 255 + 0.5)); private static final int THANK_INFO_Y = uiScale(382); + private static final String ARIAL_FONT_NAME = "Arial"; + private static final String YAHEI_FONT_NAME = "Microsoft YaHei"; + private static final String GUEST = getRandomUser(); private String showText = ""; @@ -87,6 +91,7 @@ public class ReportSplashPane extends SplashPane { Icon icon = IconLoader.getIcon(StableUtils.pathJoin(OEM_PATH, getImageName())); icon.paintIcon(null, g, 0, 0); paintShowText((Graphics2D) g); + g.dispose(); } public void setShowText(String text) { @@ -102,7 +107,16 @@ public class ReportSplashPane extends SplashPane { GraphHelper.applyRenderingHints(splashG2d); splashG2d.setPaint(MODULE_COLOR); - splashG2d.setFont(new Font("Dialog", Font.PLAIN, 12)); + + Font font = null; + if (OperatingSystem.isWindows()) { + font = new Font(YAHEI_FONT_NAME, Font.PLAIN, uiScale(12)); + } + + if (font == null || isDialogFont(font)) { + font = createFont(ARIAL_FONT_NAME); + } + splashG2d.setFont(font); //加载模块信息 GraphHelper.drawString(splashG2d, showText, MODULE_INFO_X, MODULE_INFO_Y); @@ -115,6 +129,14 @@ public class ReportSplashPane extends SplashPane { } } + private boolean isDialogFont(Font font) { + return Font.DIALOG.equals(font.getFamily(Locale.US)); + } + + private Font createFont(String fontName) { + return new Font(fontName, Font.PLAIN, uiScale(12)); + } + // 是否显示鸣谢文字 private boolean shouldShowThanks() { Locale[] hideLocales = {Locale.US, Locale.KOREA, Locale.JAPAN}; From 26552044ee0b72847eb8aba7d1713e5e883cfd03 Mon Sep 17 00:00:00 2001 From: zhouping Date: Fri, 15 Sep 2017 14:24:28 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20=E5=90=88?= =?UTF-8?q?=E5=B9=B6=E4=B8=A2=E5=A4=B1=EF=BC=8Cbuild=20failed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/gui/ilable/UILabel.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/designer_base/src/com/fr/design/gui/ilable/UILabel.java b/designer_base/src/com/fr/design/gui/ilable/UILabel.java index b1c90d8ff..c0b921dee 100644 --- a/designer_base/src/com/fr/design/gui/ilable/UILabel.java +++ b/designer_base/src/com/fr/design/gui/ilable/UILabel.java @@ -29,6 +29,11 @@ public class UILabel extends JLabel { super(text); } + public UILabel(String text, boolean enable) { + super(text); + this.setEnabled(enable); + } + public UILabel(Icon image, int horizontalAlignment) { super(image, horizontalAlignment); }