From 383d52bc30eb5066dace13044c79f5c3720ffb19 Mon Sep 17 00:00:00 2001 From: vito Date: Thu, 4 Jan 2024 11:30:22 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-99485=20=E4=BF=AE=E6=94=B9=E5=AD=97?= =?UTF-8?q?=E4=BD=93=E4=B8=BA=E5=B9=B3=E5=8F=B0=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/utils/DesignUtils.java | 13 ------------- .../theme/light/ui/laf/FineLightLaf.properties | 15 +++++++++------ 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/utils/DesignUtils.java b/designer-base/src/main/java/com/fr/design/utils/DesignUtils.java index 2da9646639..1b9925be3c 100644 --- a/designer-base/src/main/java/com/fr/design/utils/DesignUtils.java +++ b/designer-base/src/main/java/com/fr/design/utils/DesignUtils.java @@ -36,7 +36,6 @@ import com.fr.workspace.WorkContext; import org.jetbrains.annotations.NotNull; import javax.swing.SwingUtilities; -import javax.swing.UIManager; import java.awt.Desktop; import java.awt.Font; import java.io.BufferedReader; @@ -51,7 +50,6 @@ import java.net.ServerSocket; import java.net.Socket; import java.net.URI; import java.nio.charset.StandardCharsets; -import java.util.Enumeration; import java.util.Locale; import java.util.Set; import java.util.concurrent.Callable; @@ -307,17 +305,6 @@ public class DesignUtils { */ public static void initLookAndFeel() { FineLightLaf.setup(); - //获取当前系统语言下设计器用的默认字体 - FRFont guiFRFont = getDefaultGUIFont(); - //指定UIManager中字体 - Enumeration keys = UIManager.getDefaults().keys(); - while (keys.hasMoreElements()) { - String key = keys.nextElement().toString(); - - if (key.endsWith(".font")) { - UIManager.put(key, isTextField(key) ? getNamedFont("Dialog") : guiFRFont); - } - } FlatUIDefaultsInspector.install( "ctrl shift alt Y" ); } diff --git a/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties b/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties index 7a7a852246..6ca738de61 100644 --- a/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties +++ b/designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties @@ -32,14 +32,17 @@ # font weights # Windows -[win]light.font = "Microsoft YaHei", "Microsoft JhengHei", "MingLiU", "Arial" -[win]semibold.font = "Microsoft YaHei", "Microsoft JhengHei", "MingLiU", "Arial" +[win]defaultFont = "Microsoft YaHei", "Microsoft JhengHei", MingLiU, Arial +[win]light.font = "Microsoft YaHei", "Microsoft JhengHei", MingLiU, "Arial +[win]semibold.font = "Microsoft YaHei", "Microsoft JhengHei", MingLiU, Arial # macOS -[mac]light.font = "PingFang SC", "Apple LiGothic", "Apple LiSun", "Arial" -[mac]semibold.font = "PingFang SC", "Apple LiGothic", "Apple LiSun", "Arial" +[mac]defaultFont = 12 "PingFang SC", "Apple LiGothic", "Apple LiSun", Arial +[mac]light.font = "PingFang SC", "Apple LiGothic", "Apple LiSun", Arial +[mac]semibold.font = "PingFang SC", "Apple LiGothic", "Apple LiSun", Arial # Linux -[linux]light.font = "Noto SansCJK", "SimHei", "Arial", "Ubuntu" -[linux]semibold.font = "Noto SansCJK", "SimHei", "Arial", "Ubuntu" +[linux]defaultFont = 12 "Noto SansCJK", SimHei, Arial, Ubuntu +[linux]light.font = "Noto SansCJK", SimHei, Arial, Ubuntu +[linux]semibold.font = "Noto SansCJK", SimHei, Arial, Ubuntu #---- variables ---- Component.defaultHeight=24