We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Responsive is broken. The size provided in the closure will update, but the components inside will not update.
https://github.com/iced-rs/iced/blob/fcb1b454368638209862aeb5db41bc5f7d6d51a7/widget/src/lazy/responsive.rs#LL63C35-L63C35 This condition was added to only update the content layout if it is invalidated, however the content layout does not invalidate itself.
The content layout should be invalidated? Or we need to set the layout to None in update?
if self.size == new_size { return; } self.layout = None; // ?
master
Windows
No response
The text was updated successfully, but these errors were encountered:
Do you have an SSCCE?
Sorry, something went wrong.
use iced::advanced::Widget; use iced::widget::{Container, Responsive}; use iced::{Background, Color, Element, Sandbox, Settings}; pub fn main() -> iced::Result { HelloWorld::run(Settings::default()) } #[derive(Debug, Clone, Copy)] pub enum Message {} struct HelloWorld {} impl Sandbox for HelloWorld { type Message = Message; fn new() -> Self { HelloWorld {} } fn title(&self) -> String { "Test".to_string() } fn update(&mut self, message: Self::Message) {} fn view(&self) -> Element<Message> { Responsive::new(|view| { Container::new("text") .width(view.width / 2.0) .height(view.height / 2.0) .style(|theme: &iced::Theme| iced::widget::container::Appearance { text_color: None, background: Some(Background::Color(Color::new(1.0, 0.0, 0.0, 1.0))), border_radius: Default::default(), border_width: 0.0, border_color: Default::default(), }) .into() }) .into() } }
Responsive
view
Thanks! Should be fixed by #1890.
Successfully merging a pull request may close this issue.
Is there an existing issue for this?
Is this issue related to iced?
What happened?
Responsive is broken. The size provided in the closure will update, but the components inside will not update.
https://github.com/iced-rs/iced/blob/fcb1b454368638209862aeb5db41bc5f7d6d51a7/widget/src/lazy/responsive.rs#LL63C35-L63C35
This condition was added to only update the content layout if it is invalidated, however the content layout does not invalidate itself.
What is the expected behavior?
The content layout should be invalidated? Or we need to set the layout to None in update?
Version
master
Operative System
Windows
Do you have any log output?
No response
The text was updated successfully, but these errors were encountered: