On Wed, 22 Apr 2020 15:54:09 GMT, John Hendrikx <jhendr...@openjdk.org> wrote:
>> modules/javafx.controls/src/main/java/com/sun/javafx/scene/control/skin/Utils.java >> line 426: >> >>> 425: >>> 426: height += lineSpacing; >>> 427: >> >> Modifying 'height' parameter seems incorrect as this parameter is used in >> other calculations below. If needed, use a >> separate local variable to use 'height+lineSpacing' > > The height used needs to be changed everywhere. However, I can move this to > the caller instead, with a comment > explaining why: >> The computeClippedWrappedText call works with full lines (height of line + >> line spacing), including the last line. >> However the wrap height does not include the line spacing for the last line. >> In order to avoid wrapping the last line >> of text even though there is sufficient space the wrap height passed to >> computeClippedWrappedText is increased with the >> line spacing so it computes the correct text. I see your point. I am OK with the changes that you have done. ------------- PR: https://git.openjdk.java.net/jfx/pull/173