Skip to content

Invalidate responsive layout when shell layout is invalidated - #1799

Merged
hecrj merged 4 commits into
iced-rs:masterfrom
tarkah:fix/responsive-layout
Apr 21, 2023
Merged

hecrj merged 4 commits into
iced-rs:masterfrom
tarkah:fix/responsive-layout

Conversation

@tarkah

@tarkah tarkah commented Apr 18, 2023

Copy link
Copy Markdown
Member

Responsive layout was only being recomputed if size changed. This caused a panic if a downstream widget changed between layout calls of the same view / User Interface root element. This is technically possible with Component and panic's can be reliably recreated by nesting a Component inside a Responsive and returning totally different elements from it's view after processing updates.

@tarkah
tarkah force-pushed the fix/responsive-layout branch from c399764 to ac7b77f Compare April 18, 2023 01:42
@tarkah tarkah changed the title Invalidate responsive layout when layout is called Invalidate responsive layout when shell layout is invalidated Apr 18, 2023
Comment thread lazy/src/responsive.rs Resolved
@hecrj hecrj added bug Something isn't working widget labels Apr 18, 2023
@hecrj hecrj added this to the 0.10.0 milestone Apr 18, 2023
Co-authored-by: Héctor Ramón <hector0193@gmail.com>
@tarkah
tarkah requested a review from hecrj April 18, 2023 02:05

@hecrj hecrj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good! Thanks 🙇

I made a small change that allows us to avoid cloning the layout::Node altogether in ecc1a45.

@hecrj
hecrj enabled auto-merge April 21, 2023 19:44
@hecrj
hecrj merged commit 501b6b8 into iced-rs:master Apr 21, 2023
hahnavi pushed a commit to hahnavi/iced that referenced this pull request Sep 26, 2026
Invalidate responsive layout when shell layout is invalidated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working widget

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants