On Thu, 26 Mar 2026 15:31:30 GMT, Andy Goryachev <[email protected]> wrote:
>> Christopher Schnick has updated the pull request incrementally with two
>> additional commits since the last revision:
>>
>> - Adjust tests
>> - Adjust tests
>
> modules/javafx.controls/src/main/java/javafx/scene/control/skin/TextFieldSkin.java
> line 257:
>
>> 255:
>> 256: if (caretPath.getElements().size() != 0) {
>> 257: caretWidth =
>> Math.round(caretPath.getLayoutBounds().getWidth());
>
> I wonder if this should be `Region.snapSizeX()` instead of `Math.round()`:
> not only Math.round() may round downward, but also produce mid-pixel results
> on systems with fractional scale.
>
> Can you double check it on Windows at fractional scales (125%, 150%, 175%,
> 225%)?
Since `caretWidth` is not directly used here, but rather in other code to
calculate the translation or related, it is very likely fine here, but the
target values in the other calculations may need to be snapped.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/2128#discussion_r2996202833