Ability to requery scrollbar width#264
Open
alexgreenland wants to merge 1 commit intomalte-wessel:masterfrom
Open
Ability to requery scrollbar width#264alexgreenland wants to merge 1 commit intomalte-wessel:masterfrom
alexgreenland wants to merge 1 commit intomalte-wessel:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Noticed a bug when switching from a scrollwheel mouse to an Apple Magic Trackpad/Mouse. You can see the bug on the demo page. The width doesn't update to take into account the new scrollbar. The code right now expects the scrollbar width not to change, it caches it forever. As I'm sure you know, with scrollwheel mice on macOS, the scrollbar is always present; with Apple pointer devices, only the thumb is visible when scrolling.
This adds a function which will invalidate the scrollbar width cache and requery scrollbar width on next render. Right now, it is external to detect a device change and call this function.