Re: RFR: 8313709: Wrong layout of a FlowPane in a BorderPane in a ScrollPane, if padding is too big [v2]

2023-11-02 Thread Marius Hanl
On Tue, 8 Aug 2023 23:44:58 GMT, Jose Pereda wrote: >> So far, BorderPane does the calculation for the children min/pref >> width/height taken into account only the margin applied to them, if any, but >> not the total padding that could be applied as well to the BorderPane itself. >> >>

Re: RFR: 8313709: Wrong layout of a FlowPane in a BorderPane in a ScrollPane, if padding is too big [v2]

2023-10-26 Thread John Hendrikx
On Thu, 26 Oct 2023 00:31:52 GMT, Michael Strauß wrote: >> Jose Pereda has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Migrate old tests to JUnit 5 > > modules/javafx.graphics/src/main/java/javafx/scene/layout/BorderPane.java > line

Re: RFR: 8313709: Wrong layout of a FlowPane in a BorderPane in a ScrollPane, if padding is too big [v2]

2023-08-18 Thread Kevin Rushforth
On Fri, 18 Aug 2023 18:04:14 GMT, Andy Goryachev wrote: >> Please, see my edited comment. If we are to change to snapped values >> _everywhere_ (not only in the proposed fix of this PR), that would be a >> broader change... > > no, I did not propose to change it everywhere. > In this PR, in

Re: RFR: 8313709: Wrong layout of a FlowPane in a BorderPane in a ScrollPane, if padding is too big [v2]

2023-08-18 Thread Andy Goryachev
On Fri, 18 Aug 2023 18:00:48 GMT, Jose Pereda wrote: >> Following the great insight @hjohn vocalized in one of the earlier PRs, at >> the end we are always dealing with integer pixel coordinates. >> >> so, to be correct, any computation that returns pixel coordinates must use >> snapped

Re: RFR: 8313709: Wrong layout of a FlowPane in a BorderPane in a ScrollPane, if padding is too big [v2]

2023-08-18 Thread Jose Pereda
On Fri, 18 Aug 2023 17:48:16 GMT, Andy Goryachev wrote: >> You might be right. >> >> In this case, `topPrefHeight` comes from `getAreaHeight()`, that calls >> `computeChildPrefAreaHeight()` that ultimately uses `snapSpaceY()`. >> >> However, this would also mean that the returned value

Re: RFR: 8313709: Wrong layout of a FlowPane in a BorderPane in a ScrollPane, if padding is too big [v2]

2023-08-18 Thread Andy Goryachev
On Fri, 18 Aug 2023 17:34:28 GMT, Jose Pereda wrote: >> modules/javafx.graphics/src/main/java/javafx/scene/layout/BorderPane.java >> line 395: >> >>> 393: >>> 394: double middleAreaHeight = Math.max(0, >>> 395: height - insets.getTop() - insets.getBottom() -

Re: RFR: 8313709: Wrong layout of a FlowPane in a BorderPane in a ScrollPane, if padding is too big [v2]

2023-08-18 Thread Jose Pereda
On Wed, 16 Aug 2023 21:26:21 GMT, Andy Goryachev wrote: >> Jose Pereda has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Migrate old tests to JUnit 5 > > modules/javafx.graphics/src/main/java/javafx/scene/layout/BorderPane.java > line

Re: RFR: 8313709: Wrong layout of a FlowPane in a BorderPane in a ScrollPane, if padding is too big [v2]

2023-08-16 Thread Andy Goryachev
On Tue, 8 Aug 2023 23:44:58 GMT, Jose Pereda wrote: >> So far, BorderPane does the calculation for the children min/pref >> width/height taken into account only the margin applied to them, if any, but >> not the total padding that could be applied as well to the BorderPane itself. >> >>

Re: RFR: 8313709: Wrong layout of a FlowPane in a BorderPane in a ScrollPane, if padding is too big [v2]

2023-08-16 Thread Andy Goryachev
On Tue, 8 Aug 2023 23:44:58 GMT, Jose Pereda wrote: >> So far, BorderPane does the calculation for the children min/pref >> width/height taken into account only the margin applied to them, if any, but >> not the total padding that could be applied as well to the BorderPane itself. >> >>

Re: RFR: 8313709: Wrong layout of a FlowPane in a BorderPane in a ScrollPane, if padding is too big [v2]

2023-08-08 Thread Jose Pereda
On Tue, 8 Aug 2023 12:25:53 GMT, Kevin Rushforth wrote: >> Jose Pereda has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Migrate old tests to JUnit 5 > > modules/javafx.graphics/src/test/java/test/javafx/scene/layout/BorderPaneTest.java >

Re: RFR: 8313709: Wrong layout of a FlowPane in a BorderPane in a ScrollPane, if padding is too big [v2]

2023-08-08 Thread Jose Pereda
> So far, BorderPane does the calculation for the children min/pref > width/height taken into account only the margin applied to them, if any, but > not the total padding that could be applied as well to the BorderPane itself. > > However, this padding needs to be taken into account as well,