-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fix: overlay layout for Responsive
#1262
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
Conversation
@@ -258,7 +258,7 @@ where | |||
None => self.body.overlay(children.next()?, renderer), | |||
} | |||
} else { | |||
self.body.overlay(layout, renderer) | |||
self.body.overlay(layout.children().last()?, renderer) |
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 seems incorrect, since we are returning the body
layout directly in layout
when no title bar is present:
iced/native/src/widget/pane_grid/content.rs
Lines 153 to 155 in a536f5e
} else { | |
self.body.layout(renderer, limits) | |
} |
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.
Oh you're right 🤔, not sure why this fixes the cases I'm looking at then. There must be an extra layout node coming in somewhere else.
My bad, what I was seeing actually has nothing to do with PaneGrid
and was due to the issue with Component
's overlay that was already fixed in #1205.
Updated this to remove the PaneGrid
changes.
.unwrap() | ||
.borrow_overlay() | ||
.as_ref() | ||
.map(|overlay| overlay.position()) |
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.
Ah, good catch!
a536f5e
to
a12a92c
Compare
PaneGrid
& Responsive
Responsive
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!
The layout node passed to a child of
Responsive
may be incorrect in some cases. This PR fixes the overlay.