Set empty border on VisibleComponent
VisibleComponent is a JInternalFrame but never used in a JDesktopPane. Darklaf adds a shadow border around the frame which looks odd in this case. Explicitly setting an empty border solves this issue.
This commit is contained in:
parent
53750cffa2
commit
3ab009dc5b
1 changed files with 12 additions and 1 deletions
|
@ -3,8 +3,10 @@ package the.bytecode.club.bytecodeviewer.gui.components;
|
|||
import com.github.weisj.darklaf.icons.ThemedSVGIcon;
|
||||
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;
|
||||
|
||||
import javax.swing.BorderFactory;
|
||||
import javax.swing.JInternalFrame;
|
||||
|
||||
/***************************************************************************
|
||||
|
@ -41,6 +43,15 @@ public abstract class VisibleComponent extends JInternalFrame
|
|||
this.setDefaultIcon();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateUI() {
|
||||
if (Configuration.lafTheme != LAFTheme.SYSTEM)
|
||||
setBorder(BorderFactory.createEmptyBorder());
|
||||
else
|
||||
setBorder(null);
|
||||
super.updateUI();
|
||||
}
|
||||
|
||||
public void setDefaultIcon()
|
||||
{
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue