Made svg size to const

This commit is contained in:
Marco Kühn 2022-01-20 13:50:59 +01:00
parent 0d626bb6dc
commit 83c1ae6814

View File

@ -8,6 +8,8 @@ import javafx.scene.shape.SVGPath;
public class SvgBtnCreator { public class SvgBtnCreator {
private static final int SVG_SIZE = 24;
public static Button cretaeBtn(Group group) { public static Button cretaeBtn(Group group) {
Button btn = new Button(); Button btn = new Button();
@ -16,8 +18,8 @@ public class SvgBtnCreator {
group.setScaleX(scaleDel); group.setScaleX(scaleDel);
group.setScaleY(scaleDel); group.setScaleY(scaleDel);
btn.setGraphic(group); btn.setGraphic(group);
btn.setMaxSize(24, 24); btn.setMaxSize(SVG_SIZE, SVG_SIZE);
btn.setMinSize(24, 24); btn.setMinSize(SVG_SIZE, SVG_SIZE);
btn.setContentDisplay(ContentDisplay.GRAPHIC_ONLY); btn.setContentDisplay(ContentDisplay.GRAPHIC_ONLY);
return btn; return btn;