RFR: 8299753: Tree/TableView: Column Resizing With Fractional Scale [v6]
Kevin Rushforth
kcr at openjdk.org
Wed Jan 29 21:46:01 UTC 2025
On Mon, 27 Jan 2025 15:41:55 GMT, Andy Goryachev <angorya at openjdk.org> wrote:
>>> we will violate the max constraint if we snap to a larger value.
>>
>> Well, it's inherently an over-constrained problem. Conceptually, though, this does not violate the constraint. When snap-to-pixel is enabled, all values, including min and max values are snapped to a pixel that can be almost 1 pixel larger or smaller than it's given value. Within that tolerance, we are honoring the min and max values.
>>
>> It isn't required that we always ceil the min value and floor the max value (not to mention that doing that is what causes the odd min > max).
>>
>> So I don't buy this argument. Is there some other reason to do it?
>
> no other reason. are you suggesting to simply `round()`?
Your change to use `snapSize` for both (which ends up calling `ceil`) looks good.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1156#discussion_r1934555424
More information about the openjfx-dev
mailing list