Skip to content

Commit

Permalink
Turned off the use of Quaqua in Mac OS (it is no longer being develop…
Browse files Browse the repository at this point in the history
…ed and has issues in Java 10).
  • Loading branch information
rambaut committed Aug 9, 2018
1 parent e38b662 commit 83f724d
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 51 deletions.
2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@
<property name="version" value="1.9"/>
-->
<property name="version" value="1.10.1"/>
<property name="jvm_version" value="1.6+"/>
<property name="jvm_version" value="1.7+"/>

<property name="version_number" value="1.10.1"/>
<property name="copyright" value="Copyright 2002-2018"/>
Expand Down
Binary file removed release/Mac/lib/libquaqua64.dylib
Binary file not shown.
Binary file removed release/Mac/lib/libquaqua64.jnilib
Binary file not shown.
Binary file removed release/Mac/lib/quaqua.jar
Binary file not shown.
106 changes: 56 additions & 50 deletions src/dr/app/beauti/BeautiApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -170,58 +170,64 @@ static public void main(String[] args) {
System.setProperty("swing.aatext", "true");

System.setProperty("apple.awt.graphics.UseQuartz", "true");
System.setProperty("apple.awt.antialiasing","true");
System.setProperty("apple.awt.rendering","VALUE_RENDER_QUALITY");

System.setProperty("apple.laf.useScreenMenuBar","true");
System.setProperty("apple.awt.draggableWindowBackground","true");
System.setProperty("apple.awt.showGrowBox","true");

try {
// set the Quaqua Look and Feel in the UIManager
javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
try {
System.setProperty(
"Quaqua.design","Sierra"
);
System.setProperty("apple.awt.antialiasing", "true");
System.setProperty("apple.awt.rendering", "VALUE_RENDER_QUALITY");

try {
// We need to do this using dynamic class loading to avoid other platforms
// having to link to this class. If the Quaqua library is not on the classpath
// it simply won't be used.
Class<?> qm = Class.forName("ch.randelshofer.quaqua.QuaquaManager");
//
// Method method = qm.getMethod("setIncludedUIs", Set.class);
// Set<String> includes = new HashSet<String>();
// includes.add("ColorChooser");
// includes.add("FileChooser");
// includes.add("Button");
// includes.add("SplitPane");
// includes.add("Table");
// includes.add("Panel");
// method.invoke(null, includes);

Method method = qm.getMethod("setExcludedUIs", Set.class);
Set<String> excludes = new HashSet<String>();
excludes.add("RootPane");
// excludes.add("Table");
excludes.add("TextField");
method.invoke(null, excludes);

}
catch (Throwable e) {
}
System.setProperty("apple.laf.useScreenMenuBar", "true");
System.setProperty("apple.awt.draggableWindowBackground", "true");
System.setProperty("apple.awt.showGrowBox", "true");

//set the Quaqua Look and Feel in the UIManager
UIManager.setLookAndFeel("ch.randelshofer.quaqua.QuaquaLookAndFeel");
lafLoaded = true;
} catch (Exception e) {
}
}
});
} catch (Exception e) {
}
// int javaVersion = Integer.parseInt(System.getProperty("java.version").split("\\.")[0]);
//
// System.out.println("Java version: " + javaVersion);
//
//
// if (javaVersion < 10) {
// try {
// // set the Quaqua Look and Feel in the UIManager
// javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
// public void run() {
// try {
// System.setProperty(
// "Quaqua.design", "Sierra"
// );
//
// try {
// // We need to do this using dynamic class loading to avoid other platforms
// // having to link to this class. If the Quaqua library is not on the classpath
// // it simply won't be used.
// Class<?> qm = Class.forName("ch.randelshofer.quaqua.QuaquaManager");
//
//// Method method = qm.getMethod("setIncludedUIs", Set.class);
//// Set<String> includes = new HashSet<String>();
////// includes.add("ColorChooser");
////// includes.add("FileChooser");
//// includes.add("Button");
//// includes.add("SplitPane");
//// includes.add("Table");
//// includes.add("Panel");
//// method.invoke(null, includes);
//
// Method method = qm.getMethod("setExcludedUIs", Set.class);
// Set<String> excludes = new HashSet<String>();
// excludes.add("RootPane");
//// excludes.add("Table");
// excludes.add("TextField");
// method.invoke(null, excludes);
//
// } catch (Throwable e) {
// }
//
// //set the Quaqua Look and Feel in the UIManager
// UIManager.setLookAndFeel("ch.randelshofer.quaqua.QuaquaLookAndFeel");
// lafLoaded = true;
// } catch (Exception e) {
// }
// }
// });
// } catch (Exception e) {
// }
// }

UIManager.put("SystemFont", new Font("Lucida Grande", Font.PLAIN, 13));
UIManager.put("SmallSystemFont", new Font("Lucida Grande", Font.PLAIN, 11));
Expand Down

0 comments on commit 83f724d

Please sign in to comment.