diff --git a/src/me/nov/threadtear/execution/ExecutionCategory.java b/src/me/nov/threadtear/execution/ExecutionCategory.java index 64f45b4..83ca483 100644 --- a/src/me/nov/threadtear/execution/ExecutionCategory.java +++ b/src/me/nov/threadtear/execution/ExecutionCategory.java @@ -1,8 +1,8 @@ package me.nov.threadtear.execution; public enum ExecutionCategory { - GENERIC("Generic"), CLEANING("Cleaning"), ANALYSIS("Analysis"), STRINGER("Stringer Obfuscator"), ZKM("ZKM Obfuscator"), ALLATORI("Allatori Obfuscator"), TOOLS("Tools"), - SB27("Superblaubeere27 Obfuscator"); + GENERIC("Generic"), CLEANING("Cleaning"), ANALYSIS("Analysis"), STRINGER("Stringer Obfuscator"), ZKM("ZKM Obfuscator"), ALLATORI("Allatori Obfuscator"), SB27("Superblaubeere27 Obfuscator"), + TOOLS("Tools"); public final String name; diff --git a/src/me/nov/threadtear/swing/Utils.java b/src/me/nov/threadtear/swing/Utils.java index c0d19e9..37367a0 100644 --- a/src/me/nov/threadtear/swing/Utils.java +++ b/src/me/nov/threadtear/swing/Utils.java @@ -2,9 +2,13 @@ import java.awt.BorderLayout; import java.awt.Component; +import java.awt.Image; +import java.awt.image.BufferedImage; import java.util.Objects; import javax.swing.BorderFactory; +import javax.swing.Icon; +import javax.swing.ImageIcon; import javax.swing.JPanel; import javax.swing.JTree; import javax.swing.tree.DefaultTreeModel; @@ -51,4 +55,14 @@ public static String getVersion() { return "(dev)"; } } + + public static Image iconToImage(Icon icon) { + if (icon instanceof ImageIcon) { + return ((ImageIcon) icon).getImage(); + } else { + BufferedImage image = new BufferedImage(icon.getIconWidth(), icon.getIconHeight(), BufferedImage.TYPE_INT_ARGB); + icon.paintIcon(null, image.getGraphics(), 0, 0); + return image; + } + } } diff --git a/src/me/nov/threadtear/swing/frame/DecompilerFrame.java b/src/me/nov/threadtear/swing/frame/DecompilerFrame.java index e54250c..7fa0714 100644 --- a/src/me/nov/threadtear/swing/frame/DecompilerFrame.java +++ b/src/me/nov/threadtear/swing/frame/DecompilerFrame.java @@ -11,6 +11,9 @@ import org.objectweb.asm.tree.ClassNode; +import com.github.weisj.darklaf.icons.IconLoader; + +import me.nov.threadtear.swing.Utils; import me.nov.threadtear.swing.panel.DecompilerPanel; public class DecompilerFrame extends JFrame { @@ -21,6 +24,7 @@ public DecompilerFrame(ClassNode cn) { setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); setBounds(100, 100, 1000, 600); setLayout(new BorderLayout()); + setIconImage(Utils.iconToImage(IconLoader.get().loadSVGIcon("res/decompile.svg", 64, 64, false))); setAlwaysOnTop(true); JPanel cp = new JPanel(new BorderLayout()); cp.setBorder(BorderFactory.createEmptyBorder(8, 8, 8, 8)); diff --git a/src/me/nov/threadtear/swing/panel/DecompilerPanel.java b/src/me/nov/threadtear/swing/panel/DecompilerPanel.java index 7f391b1..434f3b1 100644 --- a/src/me/nov/threadtear/swing/panel/DecompilerPanel.java +++ b/src/me/nov/threadtear/swing/panel/DecompilerPanel.java @@ -93,7 +93,7 @@ public DecompilerPanel(ClassNode cn) { JPanel topPanel = new JPanel(); topPanel.setBorder(new EmptyBorder(1, 5, 0, 1)); topPanel.setLayout(new BorderLayout()); - topPanel.add(new JLabel("CFR Decompiler 0.149"), BorderLayout.WEST); + topPanel.add(new JLabel("CFR Decompiler 0.149 (www.benf.org/other/cfr)"), BorderLayout.WEST); topPanel.add(actionPanel, BorderLayout.EAST); this.add(topPanel, BorderLayout.NORTH); this.textArea = new DecompilerTextArea();