From ba5ffc258f6d58bf9d01226baea016db10cfd811 Mon Sep 17 00:00:00 2001 From: Modmuss50 Date: Wed, 7 Jun 2017 08:29:37 +0100 Subject: Added theme switcher + dark theme (#60) * Initial work on the color config * Save and read config from file.+ * Allow changing the editor colors * Remove the right margin * Move config to the user's home dir * Use Guava instead of Apache commons * Add runtime theme switching, includes example "dark" theme. * Rename dark theme as requested * Small clean up * Include suggestions from @Thog --- src/main/java/cuchaz/enigma/gui/Gui.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/main/java/cuchaz/enigma/gui/Gui.java') diff --git a/src/main/java/cuchaz/enigma/gui/Gui.java b/src/main/java/cuchaz/enigma/gui/Gui.java index 86c97aa..4a891cf 100644 --- a/src/main/java/cuchaz/enigma/gui/Gui.java +++ b/src/main/java/cuchaz/enigma/gui/Gui.java @@ -68,13 +68,13 @@ public class Gui { public JFileChooser exportJarFileChooser; private GuiController controller; private JFrame frame; - private PanelEditor editor; + public PanelEditor editor; private JPanel classesPanel; private JSplitPane splitClasses; private PanelIdentifier infoPanel; - private ObfuscatedHighlightPainter obfuscatedHighlightPainter; - private DeobfuscatedHighlightPainter deobfuscatedHighlightPainter; - private OtherHighlightPainter otherHighlightPainter; + public ObfuscatedHighlightPainter obfuscatedHighlightPainter; + public DeobfuscatedHighlightPainter deobfuscatedHighlightPainter; + public OtherHighlightPainter otherHighlightPainter; private SelectionHighlightPainter selectionHighlightPainter; private JTree inheritanceTree; private JTree implementationsTree; @@ -134,7 +134,7 @@ public class Gui { this.editor = new PanelEditor(this); JScrollPane sourceScroller = new JScrollPane(this.editor); this.editor.setContentType("text/minecraft"); - this.editor.setBackground(new Color(Config.INSTANCE.editorBackground)); + this.editor.setBackground(new Color(Config.getInstance().editorBackground)); DefaultSyntaxKit kit = (DefaultSyntaxKit) this.editor.getEditorKit(); kit.toggleComponent(this.editor, "de.sciss.syntaxpane.components.TokenMarker"); -- cgit v1.2.3