On Wed, 2 Aug 2023 16:36:47 GMT, Marius Hanl <mh...@openjdk.org> wrote:
> When a table has padding or the `layoutChildren` method inside the table skin > is overridden (and x/y are modified), the drag drag header, column overlay > and column line are not correctly aligned. > > The reason is that the positions were calculated incorrectly. > - **Column overlay and column line** > Always calculate in the x and y from the table. The x and y variables contain > the snapped insets (padding) and possible modifications from subclasses. > - **Drag header** > Calculate the drag x offset local bounds from the parent header (which is > either the parent column header or the root header) > Before, the local bounds were calculated from the table, which will wrongly > calculate in the padding. > We do not want to know the local bounds based of the whole table but of our > header we are in. modules/javafx.controls/src/test/java/test/javafx/scene/control/skin/TableViewSkinTest.java line 69: > 67: > scene.getStylesheets().add(TableViewSkinTest.class.getResource("TableViewSkinTest.css").toExternalForm()); > 68: > 69: stageLoader = new StageLoader(scene); Note: I just cleaned up this test to also use the more safe `stageLoader` approach. Unfortunately the diff looks a bit weird... ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/1193#discussion_r1282168787