On touch enabled devices (desktop, embedded, iOS, Android), the scrollbar controls of a ListView are misplaced: it is a narrower control (default is 8 px) than the same regular control (for non-touch enabled devices, default 20 px), and instead of being aligned to the right (vertical) or bottom (horizontal), there is a visible inset of 8 pixels.
As a simple workaround, with CSS the issue can be fixed:
.scroll-bar:vertical {
-fx-translate-x: 8;
}
.scroll-bar:horizontal {
-fx-translate-y: 8;
}
The issue can be easily reproduced (with any JDK and JavaFX version) on desktop without a touch enabled device, just by using: -Dcom.sun.javafx.touch=true
As a simple workaround, with CSS the issue can be fixed:
.scroll-bar:vertical {
-fx-translate-x: 8;
}
.scroll-bar:horizontal {
-fx-translate-y: 8;
}
The issue can be easily reproduced (with any JDK and JavaFX version) on desktop without a touch enabled device, just by using: -Dcom.sun.javafx.touch=true