summaryrefslogtreecommitdiff
path: root/src/main/java/cuchaz/enigma/config/Config.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/cuchaz/enigma/config/Config.java')
-rw-r--r--src/main/java/cuchaz/enigma/config/Config.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/cuchaz/enigma/config/Config.java b/src/main/java/cuchaz/enigma/config/Config.java
index 15a974c..20605b7 100644
--- a/src/main/java/cuchaz/enigma/config/Config.java
+++ b/src/main/java/cuchaz/enigma/config/Config.java
@@ -7,6 +7,7 @@ import cuchaz.enigma.source.DecompilerService;
7import cuchaz.enigma.source.Decompilers; 7import cuchaz.enigma.source.Decompilers;
8 8
9import cuchaz.enigma.utils.I18n; 9import cuchaz.enigma.utils.I18n;
10import cuchaz.enigma.gui.util.ScaleUtil;
10 11
11import javax.swing.*; 12import javax.swing.*;
12import javax.swing.plaf.metal.MetalLookAndFeel; 13import javax.swing.plaf.metal.MetalLookAndFeel;
@@ -78,7 +79,7 @@ public class Config {
78 public static boolean isDarkLaf() { 79 public static boolean isDarkLaf() {
79 // a bit of a hack because swing doesn't give any API for that, and we need colors that aren't defined in look and feel 80 // a bit of a hack because swing doesn't give any API for that, and we need colors that aren't defined in look and feel
80 JPanel panel = new JPanel(); 81 JPanel panel = new JPanel();
81 panel.setSize(new Dimension(10, 10)); 82 panel.setSize(ScaleUtil.getDimension(10, 10));
82 panel.doLayout(); 83 panel.doLayout();
83 84
84 BufferedImage image = new BufferedImage(panel.getSize().width, panel.getSize().height, BufferedImage.TYPE_INT_RGB); 85 BufferedImage image = new BufferedImage(panel.getSize().width, panel.getSize().height, BufferedImage.TYPE_INT_RGB);
@@ -187,6 +188,8 @@ public class Config {
187 188
188 public LookAndFeel lookAndFeel = LookAndFeel.DEFAULT; 189 public LookAndFeel lookAndFeel = LookAndFeel.DEFAULT;
189 190
191 public float scaleFactor = 1.0f;
192
190 public Decompiler decompiler = Decompiler.PROCYON; 193 public Decompiler decompiler = Decompiler.PROCYON;
191 194
192 private Config() { 195 private Config() {