File tree Expand file tree Collapse file tree
drjava/src/edu/rice/cs/drjava/config Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -302,18 +302,18 @@ static class LookAndFeels {
302302
303303 /** @return the look-and-feel class name to use by default */
304304 public static String getDefaultLookAndFeel () {
305- return "javax.swing.plaf.nimbus.NimbusLookAndFeel" ;
305+ if (PlatformFactory .ONLY .isMacPlatform ())
306+ return "javax.swing.plaf.nimbus.NimbusLookAndFeel" ;
306307 // TODO: fix this up to work with the proper look and feel -> Mac was causing problems
307- // if (PlatformFactory.ONLY.isMacPlatform())
308308// return UIManager.getSystemLookAndFeelClassName(); // Mac: Let the system decide.
309- // else // Set CrossPlatform "Nimbus" LookAndFeel
310- // try {
311- // for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels())
312- // if ("Nimbus".equals(info.getName())) return info.getClassName();
313- // } catch (Exception e) {
314- // // If Nimbus is not available, fall through and use CrossPlatformLookAndFeel
315- // }
316- // return UIManager.getCrossPlatformLookAndFeelClassName();
309+ else // Set CrossPlatform "Nimbus" LookAndFeel
310+ try {
311+ for (LookAndFeelInfo info : UIManager .getInstalledLookAndFeels ())
312+ if ("Nimbus" .equals (info .getName ())) return info .getClassName ();
313+ } catch (Exception e ) {
314+ // If Nimbus is not available, fall through and use CrossPlatformLookAndFeel
315+ }
316+ return UIManager .getCrossPlatformLookAndFeelClassName ();
317317 }
318318
319319 /** Need to ensure that a look-and-feel can be instantiated and is valid.
You can’t perform that action at this time.
0 commit comments