Skip to content

Commit 7778aac

Browse files
committed
Fixed look and feel bug
1 parent b297d3d commit 7778aac

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

drjava/src/edu/rice/cs/drjava/config/OptionConstants.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff 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.

0 commit comments

Comments
 (0)