From 4a319b526aeaf03ced0952e96315a5257b17e373 Mon Sep 17 00:00:00 2001 From: Weronika Pecio Date: Sun, 17 Sep 2017 03:04:46 +0200 Subject: [PATCH] Fix right margin for note's resizer --- .../java/com/github/nianna/karedi/display/NoteNode.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/github/nianna/karedi/display/NoteNode.java b/src/main/java/com/github/nianna/karedi/display/NoteNode.java index d7a37db..ef21708 100644 --- a/src/main/java/com/github/nianna/karedi/display/NoteNode.java +++ b/src/main/java/com/github/nianna/karedi/display/NoteNode.java @@ -109,10 +109,8 @@ private void bindProperties() { private void updateNoteStyle(Type oldType, Type newType) { noteDisplayer.updateType(oldType, newType); Bounds barBounds = noteDisplayer.getBar().getBoundsInParent(); - double leftMargin = BASIC_RESIZE_MARGIN + Math.abs(barBounds.getMinX()); - double rightMargin = BASIC_RESIZE_MARGIN - + Math.abs(barBounds.getMaxX() - noteDisplayer.getWidth()); - resizer.setMargins(new Insets(0, leftMargin, 0, rightMargin)); + double horizontalMargin = BASIC_RESIZE_MARGIN + Math.abs(barBounds.getMinX()); + resizer.setMargins(new Insets(0, horizontalMargin, 0, horizontalMargin)); } private void onMouseClicked(MouseEvent event) {