On Thu, 3 Nov 2022 21:21:42 GMT, Marius Hanl <mh...@openjdk.org> wrote:
>> The problem here is, that the `AnchorPane` does not use its snapped insets. >> Therefore, the fix is to replace all `getInsets().getXXX` calls with their >> corresponding `snappedXXXInset()` methods. >> >> Note: The reason the `AnchorPane` inside a `TitledPane` is blurry in the >> first place is because a `TitledPane` applies padding to its content. >> Line 2995 in `modena.css`: >> >> .titled-pane > .content > AnchorPane { >> -fx-padding: 0.8em; >> } >> >> which translates to 9.6px. >> >> EDIT: This is btw a good example of the JUnit 5 feature `@ParameterizedTest` >> with `@ValueSource` > > Marius Hanl has updated the pull request incrementally with one additional > commit since the last revision: > > 8295078: Replace JUnit4 with Junit5 imports Changes requested by angorya (Author). modules/javafx.graphics/src/main/java/javafx/scene/layout/AnchorPane.java line 364: > 362: } > 363: > 364: child.resizeRelocate(x, y, w, h); snapping should be done at this moment, I think, something like this: child.resizeRelocate( snapPositionX(x), snapPositionY(y), snapSizeX(w), snapSizeY(h)); and keep the original (unsnapped) code prior to this. modules/javafx.graphics/src/test/java/test/javafx/scene/layout/AnchorPaneTest.java line 742: > 740: StackPane child = new StackPane(); > 741: AnchorPane anchorpane = new AnchorPane(child); > 742: anchorpane.setStyle("-fx-padding: " + padding + "px;"); There might be two cases: when snapToPixel=true (this is the default case), and when =false. Should we test the case snapToPixel=false? ------------- PR: https://git.openjdk.org/jfx/pull/910