WIP
This commit is contained in:
parent
d5660e9265
commit
9dd95e8f27
@ -16,7 +16,7 @@ public class CONFIG {
|
|||||||
|
|
||||||
public static final int TOOLBOX_BUTTON_SIZE = 50;
|
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;
|
public static final int STAMP_GROUP_BUTTON_ICON_REAL_SIZE = STAMP_GROUP_BUTTON_SIZE - STROKE_HIGHLIGHT_WIDTH * 2;
|
||||||
|
|
||||||
|
|||||||
@ -27,10 +27,10 @@ public class StampButtonList extends MyComponent {
|
|||||||
removeAll();
|
removeAll();
|
||||||
if (stampTool.getActiveGroup() != null) {
|
if (stampTool.getActiveGroup() != null) {
|
||||||
stampTool.getActiveGroup().getStamps().stream()
|
stampTool.getActiveGroup().getStamps().stream()
|
||||||
.sorted(Comparator.comparing(Stamp::getFile))
|
.sorted(Comparator.comparing(Stamp::getFile))
|
||||||
.map(stamp -> new StampButton(stampTool, stamp))
|
.map(stamp -> new StampButton(stampTool, stamp))
|
||||||
.forEach(this::add);
|
.forEach(this::add);
|
||||||
setPreferredSize(new Dimension(SIDEBAR_WIDTH, getComponentCount() * STAMP_BUTTON_SIZE * STAMP_BUTTON_SIZE / SIDEBAR_WIDTH));
|
setPreferredSize(new Dimension(SIDEBAR_WIDTH, ((int) Math.ceil((double) getComponentCount() * STAMP_BUTTON_SIZE / SIDEBAR_WIDTH) * STAMP_BUTTON_SIZE)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
revalidate();
|
revalidate();
|
||||||
|
|||||||
@ -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) {
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user