RFR: 8299753: Tree/TableView: Column Resizing With Fractional Scale [v2]
Andy Goryachev
angorya at openjdk.org
Wed Jul 5 17:01:05 UTC 2023
On Sun, 2 Jul 2023 12:40:17 GMT, John Hendrikx <jhendrikx at openjdk.org> wrote:
>> Andy Goryachev has updated the pull request incrementally with one additional commit since the last revision:
>>
>> review comments
>
> modules/javafx.controls/src/main/java/com/sun/javafx/scene/control/ResizeHelper.java line 125:
>
>> 123: private void distribute(double delta, double[] desired) {
>> 124: double threshold = snapRound(SMALL_DELTA);
>> 125: if (Math.abs(delta) > threshold) {
>
> The threshold is pretty arbitrary, I don't think it benefits from snap rounding here. I'd be more inclined to eliminate the difference between these two functions; I would expect that if a user drags a column resizer for 100 pixels, that it should make no difference whether that was a slow drag or a fast one, and the end visuals and column sizes should be exactly the same regardless.
theoretically, may be. I could not achieve it with the algorithm that distributes space for large deltas, as it breaks down with small deltas, see my previous comment.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1156#discussion_r1253390837
More information about the openjfx-dev
mailing list