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 com.github.weisj.darklaf.icons.ThemedSVGIcon;
|
||||||
import the.bytecode.club.bytecodeviewer.Configuration;
|
import the.bytecode.club.bytecodeviewer.Configuration;
|
||||||
import the.bytecode.club.bytecodeviewer.gui.resourceviewer.Workspace;
|
import the.bytecode.club.bytecodeviewer.gui.resourceviewer.Workspace;
|
||||||
|
import the.bytecode.club.bytecodeviewer.gui.theme.LAFTheme;
|
||||||
import the.bytecode.club.bytecodeviewer.resources.IconResources;
|
import the.bytecode.club.bytecodeviewer.resources.IconResources;
|
||||||
|
|
||||||
|
import javax.swing.BorderFactory;
|
||||||
import javax.swing.JInternalFrame;
|
import javax.swing.JInternalFrame;
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
|
@ -40,7 +42,16 @@ public abstract class VisibleComponent extends JInternalFrame
|
||||||
super(title, false, false, false, false);
|
super(title, false, false, false, false);
|
||||||
this.setDefaultIcon();
|
this.setDefaultIcon();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateUI() {
|
||||||
|
if (Configuration.lafTheme != LAFTheme.SYSTEM)
|
||||||
|
setBorder(BorderFactory.createEmptyBorder());
|
||||||
|
else
|
||||||
|
setBorder(null);
|
||||||
|
super.updateUI();
|
||||||
|
}
|
||||||
|
|
||||||
public void setDefaultIcon()
|
public void setDefaultIcon()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in a new issue