aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/net/sowgro/npehero/devmenu/DiffEditor.java
diff options
context:
space:
mode:
authorsowgro <tpoke.ferrari@gmail.com>2024-07-21 02:52:14 -0400
committersowgro <tpoke.ferrari@gmail.com>2024-07-21 02:52:14 -0400
commit1f8ab609d32d8c2cd2db9e7a643a2f9c51738611 (patch)
tree4f3f5ec823e01988d54a73456c1ce0f9055c11ef /src/main/java/net/sowgro/npehero/devmenu/DiffEditor.java
parenta2b9e7822ccb32061a97de0bcbf400ea28e94d45 (diff)
downloadNPEhero-1f8ab609d32d8c2cd2db9e7a643a2f9c51738611.tar.gz
NPEhero-1f8ab609d32d8c2cd2db9e7a643a2f9c51738611.tar.bz2
NPEhero-1f8ab609d32d8c2cd2db9e7a643a2f9c51738611.zip
New json api and more refactoring
Diffstat (limited to 'src/main/java/net/sowgro/npehero/devmenu/DiffEditor.java')
-rwxr-xr-xsrc/main/java/net/sowgro/npehero/devmenu/DiffEditor.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/main/java/net/sowgro/npehero/devmenu/DiffEditor.java b/src/main/java/net/sowgro/npehero/devmenu/DiffEditor.java
index de9aad8..f5c29bd 100755
--- a/src/main/java/net/sowgro/npehero/devmenu/DiffEditor.java
+++ b/src/main/java/net/sowgro/npehero/devmenu/DiffEditor.java
@@ -84,10 +84,12 @@ public class DiffEditor extends Pane
HBox content = new HBox();
ScrollPane scroll = new ScrollPane(content);
+ scroll.setFitToWidth(true);
this.scroll = scroll;
scroll.getStyleClass().remove("scroll-pane");
scroll.getStyleClass().add("box");
- scroll.setPrefHeight(400);
+// scroll.setPrefHeight(400);
+ scroll.prefWidthProperty().bind(scroll.heightProperty().multiply(0.66));
Pane[] lanes = new Pane[5];
for (int i = 0; i < lanes.length; i++) {
@@ -95,6 +97,8 @@ public class DiffEditor extends Pane
}
content.getChildren().addAll(lanes);
+ content.setSpacing(5);
+ content.setAlignment(Pos.CENTER);
diff.notes.list.forEach(n -> lanes[n.lane].getChildren().add(drawNote(n)));
@@ -105,7 +109,10 @@ public class DiffEditor extends Pane
validNotes.setInvalid("This difficulty does not contain any notes!");
}
HBox notesLabel = new HBox(new Label("Notes"), validNotes);
- notePreview.getChildren().addAll(notesLabel, scroll, editNotes, oldEditNotes);
+ Pane scrollHolder = new Pane(scroll);
+ scroll.prefHeightProperty().bind(scrollHolder.heightProperty());
+ scrollHolder.setPrefHeight(400);
+ notePreview.getChildren().addAll(notesLabel, scrollHolder, editNotes, oldEditNotes);
notePreview.setSpacing(10);
VBox left = new VBox();