On Thu, 29 Oct 2026 14:17:33 GMT, Florian Kirmaier <[email protected]> 
wrote:

>> Follow-up to JDK-8092379: since then a gap is only rendered before a 
>> row/column in which a child starts, but two places still assumed a gap 
>> between every row/column.
>> 
>> adjustRowHeights / adjustColumnWidths reserved a gap before every row/column 
>> before distributing the percentages. They now reserve only the rendered gaps.
>> 
>> CompositeSize.getProportionalMinOrMaxSize divided the size of a spanning 
>> child by the number of rows/columns without subtracting the gaps inside the 
>> span. It now subtracts them.
>> 
>> Each fix is covered by tests that fail before and pass after the change.
>> A test application can be found in the ticket.
>> 
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> Florian Kirmaier has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   JDK-8392158 JDK-8392158 Keep percentage rows/columns at their size when 
> splitting a span's min

I think we are getting close.

modules/javafx.graphics/src/main/java/javafx/scene/layout/GridPane.java line 
2112:

> 2110:         final double right = snapSpaceX(getInsets().getRight());
> 2111:         final double hgaps = widths.computeGaps(0, widths.getLength());
> 2112:         final double contentWidth = (isSnapToPixel() ? 
> ScaledMath.floor(width, getSnapScaleX(this)) : width) - left - right;

flooring might be a problem here:
- scale 1, columns 70%,30%
- 2 children in each column with min=100, pref=20
- autosize
the first column is sized to 99

similar issue on L1867

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

PR Review: https://git.openjdk.org/jfx/pull/2312#pullrequestreview-5699529807
PR Review Comment: https://git.openjdk.org/jfx/pull/2312#discussion_r4413704100

Reply via email to