Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scrollbar thumb is too small #115

Open
zkycaesar opened this issue May 30, 2023 · 2 comments
Open

Scrollbar thumb is too small #115

zkycaesar opened this issue May 30, 2023 · 2 comments

Comments

@zkycaesar
Copy link

Some components in JavaFx, which contains scrollbars, such as TextArea, ListView and ScrollPane, when the content is very long, the scrollbar's thumb become very small.
I kind of hoping this Flowless could provide a solution for this problem. So, is there any suggestion?

@Jugen
Copy link
Contributor

Jugen commented May 30, 2023

Sorry, the VirtualizedScrollPane of Flowless uses an ordinary JavaFX ScrollBar so won't help you directly.

However, having looked at the JavaFX ScrollBarSkin implementation it seems like the simplest option would be to extend it and either override minThumbLength or layoutChildren. The minimum thumb length is currently calculated as 1.5 the width, so you could just change that to a larger more reasonable value in your override.

Then in your CSS file you can apply your custom skin to all ScrollBars with:

.scroll-bar {
    -fx-skin: "my.package.MyScrollBarSkin";
}

@PavelTurk
Copy link

@Jugen I have same problem. With 260 000 rows scrollbar thumb is one pixel line - it is impossible to catch it using mouse. At the same time double minThumbLength() {..} has package access.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants