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

Improve bounding rect code #874

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Improve bounding rect code #874

wants to merge 6 commits into from

Conversation

PoignardAzur
Copy link
Contributor

@PoignardAzur PoignardAzur commented Feb 20, 2025

Document concepts of "layout rect" and "bounding rect".
Deprecate local_layout_rect() method.
Add global_layout_rect() method.
Remove transform_changed() method.
Improve bounding rect merging code.
Tweak TestHarness::mouse_move_to.
Tweak WidgetState doc.

@PoignardAzur PoignardAzur changed the title Document concepts of "Layout rect" and "bounding rect". Improve bounding rect code Feb 20, 2025
@PoignardAzur PoignardAzur marked this pull request as ready for review February 20, 2025 11:04
@@ -75,18 +75,10 @@ fn compose_widget(
);
let parent_bounding_rect = parent_state.bounding_rect;

// This could be further optimized by more tightly clipping the child bounding rect according to the clip path.
Copy link
Contributor

Choose a reason for hiding this comment

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

This note about optimization is not present after the code was moved. Is it still a valid future thing to do?

Copy link
Contributor

Choose a reason for hiding this comment

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

Or is that the new call to overlaps? Either way, the logic in this code has changed, so the PR title that this is just adding documentation starts to become misleading.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, you renamed it after I started looking at it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This note about optimization is not present after the code was moved. Is it still a valid future thing to do?

I'd have to ask @Philipp-M. I'm not sure the note about optimization made sense in the original PR. I'd rather remove it unless we can point at a specific optimization we expect to do.

@Philipp-M Philipp-M self-requested a review February 20, 2025 12:48
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.

2 participants