Skip to content

Commit a19be49

Browse files
committed
Update darklaf to version 3.0.0
This resolves an outstanding issue allowing us to remove the temporary fix for it. Also, the "frame.svg" icon is now loaded using the official API and no longer relies on the exact location of the resource.
1 parent 35359d1 commit a19be49

File tree

4 files changed

+4
-15
lines changed

4 files changed

+4
-15
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<commons-io.version>2.11.0</commons-io.version>
2929
<commons-lang3.version>3.12.0</commons-lang3.version>
3030
<commons-text.version>1.9</commons-text.version>
31-
<darklaf.version>2.7.3</darklaf.version>
31+
<darklaf.version>3.0.0</darklaf.version>
3232
<darklaf-extensions-rsta.version>0.3.4</darklaf-extensions-rsta.version>
3333
<decompiler-fernflower.version>5.2.1.Final</decompiler-fernflower.version>
3434
<dex2jar.version>v49</dex2jar.version>

src/main/java/the/bytecode/club/bytecodeviewer/BytecodeViewer.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,6 @@
9393
* + Anything using blindlySearchForClassNode() should instead search through the resource container search function
9494
* + BCV's classLoader should be destroyed each time a resource is added or removed
9595
*
96-
* TODO DarkLAF Specific Bugs:
97-
* + JMenuBar can only be displayed on a JFrame, a work around is needed for this (Partially solved)
98-
*
9996
* TODO IN-PROGRESS:
10097
* + Resource Exporter/Save/Decompile As Zip needs to be rewritten
10198
* + Finish dragging code

src/main/java/the/bytecode/club/bytecodeviewer/gui/components/VisibleComponent.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
package the.bytecode.club.bytecodeviewer.gui.components;
22

3-
import com.github.weisj.darklaf.icons.ThemedSVGIcon;
3+
import com.github.weisj.darklaf.iconset.AllIcons;
44
import javax.swing.BorderFactory;
55
import javax.swing.JInternalFrame;
66
import the.bytecode.club.bytecodeviewer.Configuration;
7-
import the.bytecode.club.bytecodeviewer.gui.resourceviewer.Workspace;
87
import the.bytecode.club.bytecodeviewer.gui.theme.LAFTheme;
98
import the.bytecode.club.bytecodeviewer.resources.IconResources;
109

@@ -55,7 +54,7 @@ public void setDefaultIcon()
5554
{
5655
try {
5756
if(Configuration.showDarkLAFComponentIcons)
58-
setFrameIcon(new ThemedSVGIcon(Workspace.class.getResource("/com/github/weisj/darklaf/icons/frame/frame.svg").toURI(), 16, 16));
57+
setFrameIcon(AllIcons.Window.Frame.get(16, 16));
5958
else
6059
setFrameIcon(IconResources.jarIcon);
6160
} catch (Exception e) {

src/main/java/the/bytecode/club/bytecodeviewer/plugin/PluginWriter.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -133,14 +133,7 @@ public void setVisible(boolean b)
133133
p.add(p2, BorderLayout.NORTH);
134134
p.add(component, BorderLayout.CENTER);
135135

136-
JMenuBar menuBar = getJMenuBar();
137-
// As the Darklaf windows decorations steal the menu bar from the frame
138-
// it sets the preferred size to (0,0). Because we want to steal the menu bar ourselves.
139-
// we have to revert this change.
140-
// Remove when https://github.com/weisJ/darklaf/issues/258 is fixed and available in a
141-
// release.
142-
menuBar.setPreferredSize(null);
143-
p2.add(menuBar, BorderLayout.CENTER);
136+
p2.add(getJMenuBar(), BorderLayout.CENTER);
144137

145138
ComponentViewer.addComponentAsTab(pluginName, p);
146139
}

0 commit comments

Comments
 (0)