perf(ui): 优化 FlatDarculaLaf 的加载方式

- 将 UIManager.setLookAndFeel 替换为 FlatDarculaLaf.setup()
- 移除 flatlaf 依赖中的 no-natives 分类器
This commit is contained in:
李建国 2025-02-10 14:28:33 +08:00
parent 0efb720dfc
commit 22c3135352
2 changed files with 2 additions and 2 deletions

View File

@ -52,7 +52,6 @@
<groupId>com.formdev</groupId> <groupId>com.formdev</groupId>
<artifactId>flatlaf</artifactId> <artifactId>flatlaf</artifactId>
<version>3.4.1</version> <version>3.4.1</version>
<classifier>no-natives</classifier>
</dependency> </dependency>
<dependency> <dependency>
<groupId>ch.qos.logback</groupId> <groupId>ch.qos.logback</groupId>

View File

@ -22,7 +22,8 @@ public class Main {
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
AppLocker locker = AppLocker.create("aoheSaneServiceLock").setPath(Paths.get(JAVA_IO_TMPDIR)).build(); AppLocker locker = AppLocker.create("aoheSaneServiceLock").setPath(Paths.get(JAVA_IO_TMPDIR)).build();
UIManager.setLookAndFeel(new FlatDarculaLaf()); FlatDarculaLaf.setup();
//UIManager.setLookAndFeel(new FlatDarculaLaf());
try { try {
locker.lock(); locker.lock();
}catch (Exception e){ }catch (Exception e){