X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fbin%2FJalview.java;h=0ec98893703a52a5db34f31c3a7abd5c5421fc38;hb=614526a57b61c771de369d422407eb993454bd72;hp=50c98b4747ead2858286fa22d60a6c9dceef13b1;hpb=3b0aa1a072e9c18ce9b7040204584ce810803bb6;p=jalview.git diff --git a/src/jalview/bin/Jalview.java b/src/jalview/bin/Jalview.java index 50c98b4..0ec9889 100755 --- a/src/jalview/bin/Jalview.java +++ b/src/jalview/bin/Jalview.java @@ -49,6 +49,7 @@ import javax.swing.JOptionPane; import javax.swing.SwingUtilities; import javax.swing.UIManager; import javax.swing.UIManager.LookAndFeelInfo; +import javax.swing.UnsupportedLookAndFeelException; import com.formdev.flatlaf.FlatLightLaf; import com.formdev.flatlaf.util.SystemInfo; @@ -1123,8 +1124,29 @@ public class Jalview private static boolean setFlatLookAndFeel() { - boolean set = setSpecificLookAndFeel("flatlaf light", - "com.formdev.flatlaf.FlatLightLaf", false); + boolean set = false; + if (Platform.isMac()) { + try + { + UIManager.setLookAndFeel("com.formdev.flatlaf.themes.FlatMacLightLaf"); + set = true; + } catch (ClassNotFoundException | InstantiationException + | IllegalAccessException | UnsupportedLookAndFeelException e) + { + Console.debug("Exception loading FlatMacLightLaf", e); + } + } + if (!set) { + try + { + UIManager.setLookAndFeel("com.formdev.flatlaf.FlatLightLaf"); + set = true; + } catch (ClassNotFoundException | InstantiationException + | IllegalAccessException | UnsupportedLookAndFeelException e) + { + Console.debug("Exception loading FlatLightLaf", e); + } + } if (set) { if (Platform.isMac())