On Tue, 13 Oct 2026 21:52:40 GMT, Andy Goryachev <[email protected]> wrote:

>> Florian Kirmaier has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   JDK-8392158
>>   Small test cleanup
>
> modules/javafx.graphics/src/main/java/javafx/scene/layout/GridPane.java line 
> 1854:
> 
>> 1852:         final double top = snapSpaceY(getInsets().getTop());
>> 1853:         final double bottom = snapSpaceY(getInsets().getBottom());
>> 1854:         final double vgaps = heights.computeGaps(0, 
>> heights.getLength());
> 
> `computeTotalWithMultiSize` L2727 computes min and pref sizes without 
> reserving gaps

Good point.
I've added 2 more tests and a fix.

> modules/javafx.graphics/src/main/java/javafx/scene/layout/GridPane.java line 
> 2067:
> 
>> 2065:                     final double change = Math.abs(limit) <= 
>> Math.abs(portion)? limit : portion;
>> 2066:                     heights.setSize(index, isSnapToPixel() ? 
>> ScaledMath.rint(heights.getSize(index) + change, getSnapScaleY(this)) : 
>> heights.getSize(index) + change);
>> 2067:                     available = isSnapToPixel() ? Math.rint((available 
>> - change) / pixelSize) * pixelSize : available - change;
> 
> `change` is not rounded, this might fail at scales != 100%

as far as i see, change is already a multiple of pixelSize.
So i think it's correct.

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/2312#discussion_r4282748375
PR Review Comment: https://git.openjdk.org/jfx/pull/2312#discussion_r4282736826

Reply via email to