From 758651c702887cd5011d1aa700b82db76d3cf74b Mon Sep 17 00:00:00 2001 From: Ryan Scheidter Date: Sun, 13 Nov 2022 14:39:41 -0600 Subject: [PATCH] Reproduction of `Responsive` breaking Operations --- examples/scrollable/Cargo.toml | 1 + examples/scrollable/src/main.rs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/examples/scrollable/Cargo.toml b/examples/scrollable/Cargo.toml index 610c13b4b1..cc9e6f6e26 100644 --- a/examples/scrollable/Cargo.toml +++ b/examples/scrollable/Cargo.toml @@ -7,3 +7,4 @@ publish = false [dependencies] iced = { path = "../..", features = ["debug"] } +iced_lazy = { path = "../../lazy" } diff --git a/examples/scrollable/src/main.rs b/examples/scrollable/src/main.rs index 6eba34e26c..6833a96d6d 100644 --- a/examples/scrollable/src/main.rs +++ b/examples/scrollable/src/main.rs @@ -87,6 +87,7 @@ impl Application for ScrollableDemo { } fn view(&self) -> Element { + iced_lazy::responsive(|_size| { let ScrollableDemo { variants, .. } = self; let choose_theme = [ThemeType::Light, ThemeType::Dark].iter().fold( @@ -202,6 +203,7 @@ impl Application for ScrollableDemo { .center_x() .center_y() .into() + }).into() } fn theme(&self) -> Theme {