Skip to content

Commit

Permalink
Update darklaf to version 3.0.0
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
weisJ committed Apr 17, 2022
1 parent 35359d1 commit a19be49
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 15 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<commons-io.version>2.11.0</commons-io.version>
<commons-lang3.version>3.12.0</commons-lang3.version>
<commons-text.version>1.9</commons-text.version>
<darklaf.version>2.7.3</darklaf.version>
<darklaf.version>3.0.0</darklaf.version>
<darklaf-extensions-rsta.version>0.3.4</darklaf-extensions-rsta.version>
<decompiler-fernflower.version>5.2.1.Final</decompiler-fernflower.version>
<dex2jar.version>v49</dex2jar.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,6 @@
* + Anything using blindlySearchForClassNode() should instead search through the resource container search function
* + BCV's classLoader should be destroyed each time a resource is added or removed
*
* TODO DarkLAF Specific Bugs:
* + JMenuBar can only be displayed on a JFrame, a work around is needed for this (Partially solved)
*
* TODO IN-PROGRESS:
* + Resource Exporter/Save/Decompile As Zip needs to be rewritten
* + Finish dragging code
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package the.bytecode.club.bytecodeviewer.gui.components;

import com.github.weisj.darklaf.icons.ThemedSVGIcon;
import com.github.weisj.darklaf.iconset.AllIcons;
import javax.swing.BorderFactory;
import javax.swing.JInternalFrame;
import the.bytecode.club.bytecodeviewer.Configuration;
import the.bytecode.club.bytecodeviewer.gui.resourceviewer.Workspace;
import the.bytecode.club.bytecodeviewer.gui.theme.LAFTheme;
import the.bytecode.club.bytecodeviewer.resources.IconResources;

Expand Down Expand Up @@ -55,7 +54,7 @@ public void setDefaultIcon()
{
try {
if(Configuration.showDarkLAFComponentIcons)
setFrameIcon(new ThemedSVGIcon(Workspace.class.getResource("/com/github/weisj/darklaf/icons/frame/frame.svg").toURI(), 16, 16));
setFrameIcon(AllIcons.Window.Frame.get(16, 16));
else
setFrameIcon(IconResources.jarIcon);
} catch (Exception e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,7 @@ public void setVisible(boolean b)
p.add(p2, BorderLayout.NORTH);
p.add(component, BorderLayout.CENTER);

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

ComponentViewer.addComponentAsTab(pluginName, p);
}
Expand Down

0 comments on commit a19be49

Please sign in to comment.