diff --git a/src/main/java/com/andrewlalis/perfin/view/component/validation/decorators/FieldSubtextDecorator.java b/src/main/java/com/andrewlalis/perfin/view/component/validation/decorators/FieldSubtextDecorator.java index 14f41ef..d386211 100644 --- a/src/main/java/com/andrewlalis/perfin/view/component/validation/decorators/FieldSubtextDecorator.java +++ b/src/main/java/com/andrewlalis/perfin/view/component/validation/decorators/FieldSubtextDecorator.java @@ -4,6 +4,7 @@ import com.andrewlalis.perfin.view.component.validation.ValidationDecorator; import com.andrewlalis.perfin.view.component.validation.ValidationResult; import javafx.scene.Node; import javafx.scene.control.Label; +import javafx.scene.layout.HBox; import javafx.scene.layout.Pane; import javafx.scene.layout.VBox; import org.slf4j.Logger; @@ -55,6 +56,9 @@ public class FieldSubtextDecorator implements ValidationDecorator { errorLabel.getStyleClass().addAll("small-font", "negative-color-text-fill"); errorLabel.setWrapText(true); VBox validationContainer = new VBox(node, errorLabel); + if (trueParent instanceof HBox) { + HBox.setHgrow(validationContainer, HBox.getHgrow(node)); + } validationContainer.setUserData(WRAP_KEY); trueParent.getChildren().add(idx, validationContainer); return errorLabel; diff --git a/src/main/resources/edit-transaction.fxml b/src/main/resources/edit-transaction.fxml index 1d0900b..4a54347 100644 --- a/src/main/resources/edit-transaction.fxml +++ b/src/main/resources/edit-transaction.fxml @@ -27,10 +27,10 @@