Skip to content

Conversation

@JaskRendix
Copy link
Contributor

PR introduces a new method get_scrollbar(position) that makes it much easier, and cleaner, to grab a scrollbar at a specific position. Previously, the only way to access scrollbars was to reach into the private _scrollbars list and do something like _scrollbars[0]. Not ideal, especially when you don’t want to rely on internal details or remember which index matches which side.

With get_scrollbar(), you can now use a simple position string like "north" or "east" and get exactly what you need. It makes your code more readable and aligns with good encapsulation practices. It also validates the input, so you're less likely to accidentally pass something weird and have it break silently. On top of that, I added a few unit tests to verify the method works correctly across different positions and edge cases, just to be sure it's solid.

@ppizarror ppizarror merged commit e582743 into ppizarror:master Jul 25, 2025
9 checks passed
@ppizarror
Copy link
Owner

Thanks!
Let me know when you are ready in your PR initiative to create a new version

@JaskRendix JaskRendix deleted the get-scrollbar branch July 25, 2025 16:42
@JaskRendix
Copy link
Contributor Author

@ppizarror sure thing! Just one quick heads-up, while I was poking around the code, I saw that pyproject_update.py and pyproject.toml are listed in the .gitignore. Noticed they haven't been touched in a couple years, so I’m wondering, was that intentional, or were they added by accident? Just want to make sure we’re not missing anything important

@ppizarror
Copy link
Owner

I remembered adding those as I was playing around with tox and other stuff... but it was several years ago. Feel free to remove them! Thanks a lot for your contributions

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

Successfully merging this pull request may close these issues.

2 participants