On Mon, 17 Aug 2026 23:17:37 GMT, Andy Goryachev <[email protected]> wrote:
> This is a good change. My only question is whether there are other places > which needs to have the same treatment, such as StackPane. Oh, for sure. I haven't found a layout container that implements snapping correctly; all of them are defective to various degrees. I plan to fix these as a series of PRs, one for each layout container. The changes in `BorderPane` and `HeaderBar` are only the minimal change required to make the compiler happy because `Region.boundedNodeSizeWithBias()` has changed. These changes are not sufficient to fix all snapping issues in either class, and I'd defer any further cleanup to the follow-up PRs that will fix snapping in each layout container. > modules/javafx.graphics/src/main/java/javafx/scene/layout/BorderPane.java > line 569: > >> 567: false, true, snapToPixel, snapScaleX, snapScaleY, >> TEMP_VEC2D); >> 568: leftWidth = result.x; >> 569: l.resize(leftWidth, result.y); > > very minor: maybe rename result -> snappedResult for clarity? I'll fix all of these issues in a series of PRs, one for each layout container. There are many more issues to be fixed. ------------- PR Comment: https://git.openjdk.org/jfx/pull/2261#issuecomment-5321584854 PR Review Comment: https://git.openjdk.org/jfx/pull/2261#discussion_r3799638691
