-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
FIX: ScrollViewer ignores padding when measuring children #20025
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
base: master
Are you sure you want to change the base?
FIX: ScrollViewer ignores padding when measuring children #20025
Conversation
|
You can test this PR using the following package version. |
|
|
@cla-avalonia agree |
|
I tested the build |
|
The problem in I am unable to create a Another issue I started thinking about is: what does a padding in a scrolling view mean in general? Personally I want the "padding to scroll with the content", but some will probably expect a fixed padding like in other views i.e., fixed inset "frame" around the content, that scrolls within it. Maybe a scrolling view should not have a padding property at all? @timunie @trashhacker ? |
|
The team will review the PR once we have enough capacity for it. About the last question: would be interesting to evaluate what other frameworks like WPF do about the padding. |
What does the pull request do?
ScrollViewer now honors padding when measuring its children. Should fix #17158. The bug looks to be in the ScrollContentPresenter, not the ScrollViewer itself.
I am not 100% sure if this is all that is needed to fix the ScrollViewer with padding scrolling issue. This is my first look at Avalonia source code.
What is the current behavior?
Currently the ScrollViewer ignores its padding when measuring its children. And in case when it cannot scroll horizontally or vertically, it is unable to scroll to the very end, see #17158
What is the updated/expected behavior with this PR?
ScrollViewer should use its padding to limit the available size when measuring its children.
Checklist
Breaking changes
Probably none, because the current behaviour is broken and ScrollViewer cannot be scrolled to the very end.
Fixed issues
Fixes #17158
Fixes #12182