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

Handle ScrollContentPresenter extent rounding errors #12256

Merged
merged 1 commit into from Jul 19, 2023

Conversation

MrJul
Copy link
Member

@MrJul MrJul commented Jul 19, 2023

What does the pull request do?

After the fix in #11916, there are still situations where the scrollbar shows unnecessarily, due to floating point rounding errors. #12232 has an exemple with a viewport height of 176.0 but an extent height of 176.00000000000003.

After this PR, if the extent and viewport are within LayoutEpsilon of each other, the viewport is used instead.
A unit test has been added.

Fixed issues

Fixes #12232

@avaloniaui-team
Copy link
Contributor

You can test this PR using the following package version. 11.0.999-cibuild0037945-beta. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

Copy link
Member

@grokys grokys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This has been something I've been meaning to investigate for ages.

@grokys grokys added this pull request to the merge queue Jul 19, 2023
Merged via the queue into AvaloniaUI:master with commit 9b83280 Jul 19, 2023
6 checks passed
@MrJul MrJul deleted the fixes/scroll-fp-error branch August 1, 2023 13:02
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.

Scrollbars in scrollviewer still showing when unnecessary
3 participants