1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-17 22:23:10 +03:00

Moving selection of Linux look-and-feel (GTK) from Base.java to arduino.sh, so that it can be changed more easily by a user. (In particular, the GTK theme is apparently broken on KDE.)

This commit is contained in:
David A. Mellis
2009-05-30 09:45:13 +00:00
parent 090e85b5a1
commit 4c0ce78357
2 changed files with 6 additions and 18 deletions

View File

@ -118,26 +118,14 @@ public class Base {
UIManager.put("Component.visualMargin", new Insets(1, 1, 1, 1)); UIManager.put("Component.visualMargin", new Insets(1, 1, 1, 1));
} else if (Base.isLinux()) { } else if (Base.isLinux()) {
// Linux is by default even uglier than metal (Motif?). //Tweaks to the Linux LookAndFeel should go here
// Actually, i'm using native menus, so they're even uglier //Currently the GTK-LnF is set as the default theme
// and Motif-looking (Lesstif?). Ick. Need to fix this. //in the arduino startup shell script
//String lfname = UIManager.getCrossPlatformLookAndFeelClassName();
//UIManager.setLookAndFeel(lfname);
// For 0120, trying out the gtk+ look and feel as the default.
// This is available in Java 1.4.2 and later, and it can't possibly
// be any worse than Metal. (Ocean might also work, but that's for
// Java 1.5, and we aren't going there yet)
UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel");
} else { } else {
//All other platforms (should be only Windows left) use the
//standard theme
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} }
//} catch (ClassNotFoundException cnfe) {
// just default to the native look and feel for this platform
// i.e. appears that some linux systems don't have the gtk l&f
//UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }

View File

@ -13,4 +13,4 @@ export PATH
LD_LIBRARY_PATH=`pwd`/lib:${LD_LIBRARY_PATH} LD_LIBRARY_PATH=`pwd`/lib:${LD_LIBRARY_PATH}
export LD_LIBRARY_PATH export LD_LIBRARY_PATH
java processing.app.Base java -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel processing.app.Base