From 61475a24d982faa593e1a68265c5016b3f97e1e3 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Wed, 9 Aug 2017 11:22:01 -0700 Subject: [PATCH] Fix the weird scroll bars. --- src/main/java/org/nwapw/abacus/fx/DocumentationCell.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/nwapw/abacus/fx/DocumentationCell.java b/src/main/java/org/nwapw/abacus/fx/DocumentationCell.java index fbb5c0f..fc678fe 100644 --- a/src/main/java/org/nwapw/abacus/fx/DocumentationCell.java +++ b/src/main/java/org/nwapw/abacus/fx/DocumentationCell.java @@ -33,7 +33,7 @@ public class DocumentationCell extends ListCell { titledPane.textProperty().bindBidirectional(codeNameLabel.textProperty()); titledPane.setContent(vbox); titledPane.setExpanded(false); - titledPane.prefWidthProperty().bind(widthProperty()); + titledPane.prefWidthProperty().bind(widthProperty().subtract(32)); visibleProperty().addListener((a, b, c) -> titledPane.setExpanded(false)); } @@ -54,5 +54,6 @@ public class DocumentationCell extends ListCell { longDescription.setText(item.getLongDescription()); setGraphic(titledPane); } + titledPane.setExpanded(false); } }