Skip to content

Commit

Permalink
Fix decompiler panel if using light theme
Browse files Browse the repository at this point in the history
  • Loading branch information
apkreader committed Feb 18, 2021
1 parent 6dc1bad commit af9b511
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/main/java/me/grax/jbytemod/ui/DecompilerPanel.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package me.grax.jbytemod.ui;

import me.grax.jbytemod.JByteMod;
import me.grax.jbytemod.utils.ErrorDisplay;
import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea;
import org.fife.ui.rsyntaxtextarea.Theme;
Expand All @@ -15,9 +16,14 @@ public DecompilerPanel() {
this.setAntiAliasingEnabled(true);
this.setFont(new Font("Monospaced", Font.PLAIN, 12));
this.setEditable(false);
//change theme to java
// change theme to java
try {
Theme theme = Theme.load(getClass().getResourceAsStream("/org/fife/ui/rsyntaxtextarea/themes/dark.xml"));
Theme theme;
if (!JByteMod.ops.get("use_flatdark").getBoolean()) {
theme = Theme.load(getClass().getResourceAsStream("/org/fife/ui/rsyntaxtextarea/themes/idea.xml"));
} else {
theme = Theme.load(getClass().getResourceAsStream("/org/fife/ui/rsyntaxtextarea/themes/dark.xml"));
}
theme.apply(this);
} catch (IOException e1) {
new ErrorDisplay(e1);
Expand Down

0 comments on commit af9b511

Please sign in to comment.