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

Windows style scrollbars #17

Open
miquelbeltran opened this issue Oct 18, 2023 · 4 comments
Open

Windows style scrollbars #17

miquelbeltran opened this issue Oct 18, 2023 · 4 comments

Comments

@miquelbeltran
Copy link
Owner

Tried to implement this but was too complicated, need to look it up again.

image

@miquelbeltran miquelbeltran self-assigned this Oct 18, 2023
@Taosif7
Copy link
Contributor

Taosif7 commented Oct 21, 2023

@miquelbeltran can you discuss the approach you followed?

@miquelbeltran
Copy link
Owner Author

@Taosif7 sure! I have three different ideas:

Custom themed Material Scrollbar

The theming options are a bit limited, I can make the "thumb" square and match the background colors, but that's it, no elevated effect, no top and down buttons, etc. Plus, the scrollbar is rendered on top of the ListView, this can be fixed with some padding hack, but otherwise it doesn't look. I tried to work with RawScrollbar but faced similar limitations.

Custom widget

The second idea is to have a custom widget that takes a ScrollCotroller and renders a scrollbar. I haven't explored this one, but I think it is the easiest, just not sure how performant is. This is probably just the way to go. Have a Row with your ListView and the Scrollbar95, and link them two together with a ScrollController.

Custom Scrollbar class

This approach is taking the source code of the Material Scrollbar and reimplementing it. I haven't thought much about it, but I guess too complex for a novelty project like this.

Overall, probably the custom widget approach is the way to go.

@Taosif7
Copy link
Contributor

Taosif7 commented Oct 23, 2023

Great, I'll explore further on 2nd & 3rd options!

@Taosif7
Copy link
Contributor

Taosif7 commented Oct 28, 2023

@miquelbeltran I took the 2nd approach and designed a solution around it. Look at PR (#26).

Its works perfectly for now, just a few tiny things that can be improved in future. Also performance looks fine to me, although can be analysed and improved.

Once merged, I can create an issue for all the improvements I have in mind.

@miquelbeltran miquelbeltran removed their assignment Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants