From a83927210628cfdf543432f95a2013983cc7c4c7 Mon Sep 17 00:00:00 2001 From: Bruno Salmon Date: Fri, 24 Nov 2023 11:12:58 +0000 Subject: [PATCH] Updated (simplified) TextFlow code --- .../src/main/java/javafx/scene/text/TextFlow.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webfx-kit/webfx-kit-javafxgraphics-emul/src/main/java/javafx/scene/text/TextFlow.java b/webfx-kit/webfx-kit-javafxgraphics-emul/src/main/java/javafx/scene/text/TextFlow.java index 6d55f0ccb5..02c148736d 100644 --- a/webfx-kit/webfx-kit-javafxgraphics-emul/src/main/java/javafx/scene/text/TextFlow.java +++ b/webfx-kit/webfx-kit-javafxgraphics-emul/src/main/java/javafx/scene/text/TextFlow.java @@ -31,15 +31,15 @@ public Orientation getContentBias() { @Override public double prefHeight(double width) { - Insets insets = getPadding(); + Insets insets = getInsets(); double childPrefHeight; if (getChildren().isEmpty()) childPrefHeight = 0; else childPrefHeight = getChildren().get(0).prefHeight(width); - return snapSpace(insets.getTop()) + + return snapSpaceY(insets.getTop()) + childPrefHeight + - snapSpace(insets.getBottom()); + snapSpaceY(insets.getBottom()); } public void setTextAlignment(TextAlignment textAlignment) {}