On Tue, 4 Feb 2025 08:50:43 GMT, Marius Hanl <mh...@openjdk.org> wrote:

>> Andy Goryachev has updated the pull request with a new target base due to a 
>> merge or a rebase. The incremental webrev excludes the unrelated changes 
>> brought in by the merge/rebase. The pull request contains 19 additional 
>> commits since the last revision:
>> 
>>  - atomic boolean
>>  - Merge branch 'master' into 8342565.stub.text.layout
>>  - cleanup
>>  - better test
>>  - cleanup
>>  - more magic
>>  - magic numbers
>>  - more
>>  - add exports
>>  - stub fonts
>>  - ... and 9 more: https://git.openjdk.org/jfx/compare/2b26b7b8...5010278f
>
> modules/javafx.controls/src/test/java/test/javafx/scene/control/ListViewTest.java
>  line 2704:
> 
>> 2702:     private static double toViewPortLength(double prefHeight) {
>> 2703:         // it would be better to calculate this from listView but 
>> there is no API for this
>> 2704:         return prefHeight - 2;
> 
> I think after this node is inside the scene tree and has a skin, you can just 
> calculate that with: 
> `prefHeight(-1) - snappedTopInset() - snappedBottomInset()`. 
> Something like that I already used.
> 
> Also, `Viewport` is one word, so should not be camel case.

using `prefHeight(-1) - snappedTopInset() - snappedBottomInset()` breaks the 
original test, I'd rather avoid that (all I did was minor refactoring to move 
the logic and the comment into one place).

thanks for -> `toViewportLength()`

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1667#discussion_r1941711373

Reply via email to