Skip to content

Commit

Permalink
Add border to output window when theme is DarkLaf
Browse files Browse the repository at this point in the history
DarkLaf scrollbars are so thin that you only have very few pixels to grab the scrollbar with the mouse, otherwise you get to resize the window.
  • Loading branch information
Janmm14 committed Aug 21, 2021
1 parent 5934409 commit d122d2d
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.javadeobfuscator.deobfuscator.ui;

import java.awt.Color;
import java.awt.Dialog;
import java.awt.Dimension;
import java.awt.FlowLayout;
Expand Down Expand Up @@ -32,6 +33,7 @@
import java.util.stream.IntStream;

import javax.swing.*;
import javax.swing.border.MatteBorder;
import javax.swing.border.TitledBorder;

import com.github.weisj.darklaf.LafManager;
Expand Down Expand Up @@ -971,7 +973,11 @@ public void keyPressed(KeyEvent event)
JFrame newFrame = new JFrame();
newFrame.setTitle("Console");
area.setEditable(false);
newFrame.getContentPane().add(new JScrollPane(area));
JScrollPane outputScrollPane = new JScrollPane(area);
if (enableDarkLaf.getState()) {
outputScrollPane.setBorder(new MatteBorder(0, 8, 8, 8, Color.DARK_GRAY));
}
newFrame.getContentPane().add(outputScrollPane);
newFrame.pack();
newFrame.setSize(800, 600);
newFrame.setVisible(true);
Expand Down

0 comments on commit d122d2d

Please sign in to comment.