-
Notifications
You must be signed in to change notification settings - Fork 565
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
Unified origin #2149
Unified origin #2149
Conversation
72903f2
to
61d80f8
Compare
Hi @xarvic, do you think this is ready to be merged? |
I am still waiting for awnser, how to make |
Apart from that the PR is ready for review. |
I think #1611 was missing a use-case inside Druid, and this is a compelling one! |
8cc0bd2
to
96be87f
Compare
@jpochyla the PR is now ready for review. |
FWIW: I tested this on macOS and this fixes the incorrect hot state while scrolling. |
2e86495
to
f1a80a8
Compare
- add set_layout_dyn - changed clipbox implementation
- removed LifeCycle::ParentWindowOrigin - moved HotState handling from layout to LifeCycle::ViewStateChanged
rename CommandCtx to ChangeCtx
b464b34
to
7e630ec
Compare
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.
Thanks for taking this on and sorry for letting it sit so long!
Given that this changes quite a bit of code it's going to take several rounds of review. I'm going to start off with a simple surface level review of small stuff that stuck out as I went over the changes.
Next I will dig deeper to understand what is even going on here. 😄
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.
Thanks for investing your time into making the adjustments. I have reviewed the latest commit and have a few more minor notes.
I've also been playing around with the code a bit, but a more thorough review of the substance here isn't ready yet.
4fa90d2
to
92d2d1a
Compare
92d2d1a
to
702db96
Compare
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.
Okay, here's my first pass on the code. One interesting thing is that it's looking like there's increasingly fewer reasons to have the context trait changes. We'll see about that, for now can just look over the stuff I commented in this batch.
- removed data and ctx from set_origin
- fixed window.rs
added comments
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.
Thanks for your continued effort on this! I think this is ready for merge.
And thank you for the thorough review :) |
Thanks a lot Kaur! |
This PR removes the
viewport_offset
property ofWidgetPod
and changes theClipBox
implementation to useWidgetPod::set_origin
instead. This will fix incorrect hot state when scrolling.TODOs:
WidgetPod::set_origin
andWidgetPod::set_origin_dyn
scroll_to_view
andLifeCycle::ViewContextChanged
instead of manually managing itsScroll
widget