From 83c1ae68147dc178fbce2c7d7373fe35d789b04e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20K=C3=BChn?= Date: Thu, 20 Jan 2022 13:50:59 +0100 Subject: [PATCH] Made svg size to const --- client/app/src/main/java/main/SvgBtnCreator.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/app/src/main/java/main/SvgBtnCreator.java b/client/app/src/main/java/main/SvgBtnCreator.java index 1a6d5fa..cd1321e 100644 --- a/client/app/src/main/java/main/SvgBtnCreator.java +++ b/client/app/src/main/java/main/SvgBtnCreator.java @@ -8,6 +8,8 @@ import javafx.scene.shape.SVGPath; public class SvgBtnCreator { + private static final int SVG_SIZE = 24; + public static Button cretaeBtn(Group group) { Button btn = new Button(); @@ -16,8 +18,8 @@ public class SvgBtnCreator { group.setScaleX(scaleDel); group.setScaleY(scaleDel); btn.setGraphic(group); - btn.setMaxSize(24, 24); - btn.setMinSize(24, 24); + btn.setMaxSize(SVG_SIZE, SVG_SIZE); + btn.setMinSize(SVG_SIZE, SVG_SIZE); btn.setContentDisplay(ContentDisplay.GRAPHIC_ONLY); return btn;