diff --git a/core/src/cn/harryh/arkpets/tray/HostTray.java b/core/src/cn/harryh/arkpets/tray/HostTray.java index a2922c7..7503b51 100644 --- a/core/src/cn/harryh/arkpets/tray/HostTray.java +++ b/core/src/cn/harryh/arkpets/tray/HostTray.java @@ -36,11 +36,11 @@ public class HostTray { SwingUtilities.invokeLater(() -> { try { String laf = UIManager.getSystemLookAndFeelClassName(); - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); if (laf.contains("WindowsLookAndFeel")) { UIManager.put("MenuItem.margin",new Insets(2,-15,2,2)); UIManager.put("Menu.margin",new Insets(2,-15,2,2)); } + UIManager.setLookAndFeel(laf); } catch (Exception ignored) {} }); Const.FontsConfig.loadFontsToSwing(); diff --git a/core/src/cn/harryh/arkpets/tray/MemberTray.java b/core/src/cn/harryh/arkpets/tray/MemberTray.java index d243bb1..57e0f3e 100644 --- a/core/src/cn/harryh/arkpets/tray/MemberTray.java +++ b/core/src/cn/harryh/arkpets/tray/MemberTray.java @@ -26,11 +26,11 @@ public abstract class MemberTray { SwingUtilities.invokeLater(() -> { try { String laf = UIManager.getSystemLookAndFeelClassName(); - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); if (laf.contains("WindowsLookAndFeel")) { UIManager.put("MenuItem.margin",new Insets(2,-15,2,2)); UIManager.put("Menu.margin",new Insets(2,-15,2,2)); } + UIManager.setLookAndFeel(laf); } catch (Exception ignored) {} }); Const.FontsConfig.loadFontsToSwing();