mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-06 13:25:50 +00:00
Arrows instead of plus/minus
This commit is contained in:
@@ -124,6 +124,9 @@ public class TransformPanel extends JPanel {
|
||||
|
||||
private Map<String, JPanel> cardContents = new LinkedHashMap<>();
|
||||
private Map<String, JLabel> cardPlusMinusLabels = new LinkedHashMap<>();
|
||||
|
||||
private static final char PLUS_CHAR = '\u2BC8';
|
||||
private static final char MINUS_CHAR = '\u2BC6';
|
||||
|
||||
public static enum UnitKind {
|
||||
LENGTH,
|
||||
@@ -771,14 +774,14 @@ public class TransformPanel extends JPanel {
|
||||
}
|
||||
label.setHorizontalAlignment(JLabel.CENTER);
|
||||
headerPanel.add(label, BorderLayout.CENTER);
|
||||
JLabel plusMinusLabel = new JLabel("+");
|
||||
plusMinusLabel.setFont(plusMinusLabel.getFont().deriveFont(plusMinusLabel.getFont().getSize2D() * 1.8f));
|
||||
JLabel plusMinusLabel = new JLabel("" + PLUS_CHAR);
|
||||
plusMinusLabel.setFont(plusMinusLabel.getFont().deriveFont(plusMinusLabel.getFont().getSize2D() * 1.4f));
|
||||
plusMinusLabel.setHorizontalAlignment(JLabel.CENTER);
|
||||
plusMinusLabel.setPreferredSize(new Dimension(30, 30));
|
||||
plusMinusLabel.setPreferredSize(new Dimension(25, 20));
|
||||
headerPanel.add(plusMinusLabel, BorderLayout.WEST);
|
||||
headerPanel.setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED));
|
||||
headerPanel.setMaximumSize(new Dimension(Integer.MAX_VALUE, 40));
|
||||
headerPanel.setMinimumSize(new Dimension(0, 40));
|
||||
headerPanel.setMaximumSize(new Dimension(Integer.MAX_VALUE, 30));
|
||||
headerPanel.setMinimumSize(new Dimension(0, 30));
|
||||
headerPanel.setAlignmentX(Component.LEFT_ALIGNMENT);
|
||||
|
||||
cardPanel.setLayout(new BoxLayout(cardPanel, BoxLayout.Y_AXIS));
|
||||
@@ -816,9 +819,9 @@ public class TransformPanel extends JPanel {
|
||||
contents.setMaximumSize(new Dimension(Integer.MAX_VALUE, contents.getPreferredSize().height));
|
||||
JLabel plusMinusLabel = cardPlusMinusLabels.get(id);
|
||||
if (opened) {
|
||||
plusMinusLabel.setText("-");
|
||||
plusMinusLabel.setText("" + MINUS_CHAR);
|
||||
} else {
|
||||
plusMinusLabel.setText("+");
|
||||
plusMinusLabel.setText("" + PLUS_CHAR);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user