This commit is contained in:
Patrick Haßel 2023-04-16 10:31:19 +02:00
parent d5660e9265
commit 9dd95e8f27
3 changed files with 6 additions and 6 deletions

View File

@ -16,7 +16,7 @@ public class CONFIG {
public static final int TOOLBOX_BUTTON_SIZE = 50;
public static final int STAMP_GROUP_BUTTON_SIZE = 40;
public static final int STAMP_GROUP_BUTTON_SIZE = 35;
public static final int STAMP_GROUP_BUTTON_ICON_REAL_SIZE = STAMP_GROUP_BUTTON_SIZE - STROKE_HIGHLIGHT_WIDTH * 2;

View File

@ -27,10 +27,10 @@ public class StampButtonList extends MyComponent {
removeAll();
if (stampTool.getActiveGroup() != null) {
stampTool.getActiveGroup().getStamps().stream()
.sorted(Comparator.comparing(Stamp::getFile))
.map(stamp -> new StampButton(stampTool, stamp))
.forEach(this::add);
setPreferredSize(new Dimension(SIDEBAR_WIDTH, getComponentCount() * STAMP_BUTTON_SIZE * STAMP_BUTTON_SIZE / SIDEBAR_WIDTH));
.sorted(Comparator.comparing(Stamp::getFile))
.map(stamp -> new StampButton(stampTool, stamp))
.forEach(this::add);
setPreferredSize(new Dimension(SIDEBAR_WIDTH, ((int) Math.ceil((double) getComponentCount() * STAMP_BUTTON_SIZE / SIDEBAR_WIDTH) * STAMP_BUTTON_SIZE)));
}
}
revalidate();

View File

@ -9,7 +9,7 @@ public class MyGridBagConstraints extends GridBagConstraints {
}
public static MyGridBagConstraints GBC(final int x, final int y, final double wX, final double wY, final int fill) {
return new MyGridBagConstraints(x, y, 1, 1, wX, wY, PAGE_START, fill, new Insets(0, 0, 0, 0), 0, 0);
return new MyGridBagConstraints(x, y, 1, 1, wX, wY, FIRST_LINE_START, fill, new Insets(0, 0, 0, 0), 0, 0);
}
}