RFR: 8350149: VBox ignores bias of child controls when fillWidth is set to false [v4]

Kevin Rushforth kcr at openjdk.org
Mon Mar 24 23:13:13 UTC 2025


On Mon, 24 Mar 2025 21:30:50 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

>> Yes, sorry, this was addressed in the larger discussion.  I've left this as-is to keep the PR focus'd on one thing.
>> 
>> The calculation here is using 3 snapped values, and one can reasonably assume the result is "nearly" snapped.  If this value is used later with a ceiling function though, then it might ceil to the next higher value if the result is slightly too high due to floating point errors.  This is why it might be a good idea to adjust how our ceiling functions work in all cases; instead of using a tiny epsilon (or ulp), use a much larger value but still tiny in terms of pixels (like 1/10000th of a pixel).  Any "near" snapped values won't accidentally get rounded up to the next higher pixel then when ceil is used.
>
>> Any "near" snapped values won't accidentally get rounded up to the next higher pixel
> 
> I like this idea!

I agree. This sounds promising.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1723#discussion_r2011043278


More information about the openjfx-dev mailing list