Repository navigation
fix: Avoid jumpy ScrollViewer visibility on Skia by avoiding rounding errors in ScrollViewer - #7544
Merged
jeromelaban merged 1 commit intoNov 28, 2021
Conversation
jeromelaban
approved these changes
Nov 28, 2021
dr1rrb
approved these changes
Nov 28, 2021
Contributor
|
I've seen this issue before and had no idea how to approach it. During scrolling some child elements would just start jumping around +/- 1 pixel in size. Great work on tracking this down and finding a fix! |
5 of 6 tasks
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.
GitHub Issue (If applicable): closes #7514
PR Type
What kind of change does this PR introduce?
What is the current behavior?
In Skia the
ScrollViewerExtentHeightandExtentWidthare based on theActualHeightandActualWidthvalue of a child. ForTextBlockthere is a special case where these values match theDesiredSize, which may can contain values with rounding errors (e.g. 18.0013324). This then causes issues forTextBoxfor example, asExtentHeight-ViewPortHeightwill resurt in a very small number like0.0013324, which is however enough to make theScrollBarvisibility toggle betweenCollapsedandVisibleand it can happen repeatedly.What is the new behavior?
We check whether the
Extent-Viewportsubtraction actually yields a significant value, otherwise we just zero it out.PR Checklist
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Runresults.Other information
Internal Issue (If applicable):