Changed the way fonts are initialized, hoping to reduce a chance of

dialogs hanging
This commit is contained in:
Branislav Stojkovic
2018-12-24 09:18:15 +01:00
parent fb0dc31b98
commit b0e986b4f9
3 changed files with 19 additions and 11 deletions
Binary file not shown.
@@ -28,6 +28,7 @@ import java.util.Properties;
import javax.swing.ImageIcon;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
@@ -114,16 +115,19 @@ public class DIYLCStarter {
LOG.error("Could not set Look&Feel", e);
}
// Thread fontThread = new Thread(new Runnable() {
//
// @Override
// public void run() {
// LOG.debug("Starting font pre-loading");
// FontChooserComboBox box = new FontChooserComboBox();
// LOG.debug("Finished font pre-loading");
// }
// });
// fontThread.start();
Thread fontThread = new Thread(new Runnable() {
@Override
public void run() {
LOG.debug("Starting font pre-loading");
FontChooserComboBox box = new FontChooserComboBox();
box.getPreferredSize();
JPanel p = new JPanel();
box.paint(p.getGraphics());
LOG.debug("Finished font pre-loading");
}
});
fontThread.start();
String val = System.getProperty(SCRIPT_RUN);
if (!"true".equals(val)) {
+5 -1
View File
@@ -2009,7 +2009,11 @@
</versionNumber>
<releaseDate>2018-12-21 00:00:00.000 CET</releaseDate>
<name></name>
<changes>
<changes>
<org.diylc.appframework.update.Change>
<changeType>IMPROVEMENT</changeType>
<description>Changed the way fonts are initialized, hoping to reduce a chance of dialogs hanging</description>
</org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change>
<changeType>BUG_FIX</changeType>
<description>Fixed selection issues on right click in OSX</description>