-
Notifications
You must be signed in to change notification settings - Fork 88
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
Alternative scrollview implementation (doesn't use "origin" for scroll offset) #155
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from all the nitpicks, this LGTM, thanks :)
let child_size = self.child.layout(cx, child_proposed); | ||
Size::new(child_size.width, proposed_size.height) | ||
fn layout(&mut self, cx: &mut LayoutCx, bc: &BoxConstraints) -> Size { | ||
cx.request_paint(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this necessary even, when the layout hasn't changed at all?
(I see this is done in other widgets as well though, maybe a point to keep in mind later for optimization etc.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if this is the best way of doing it. But I was seeing the visual rendering on screen failing to update properly before I put this in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Read through it and played around with the example, looks like a good step forward. 👍
I also like this more than #146, because it's closer to how Druid did it. The power of familiarity.
991a346
to
c55d3e9
Compare
Co-authored-by: Kaur Kuut <strom@nevermore.ee> Co-authored-by: Philipp Mildenberger <philipp@mildenberger.me>
c55d3e9
to
b9eaabd
Compare
I've updated this to work against the upstream enumerated wheel delta type. The medium term idea is that general purpose scroll gestures will eventually be abstracted into the platform, because they will become rather complex when we start implementing kinetic scrolling (on platforms where it doesn't come for free) and touchscreen scrolling. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good start, and doesn't regress anything.
No description provided.