From a3744ec97a462557ab9a3d2509f02263f425fd28 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 20 Jan 2022 04:09:46 +0700 Subject: Recompute layout of `Responsive` contents when size changes --- lazy/src/responsive.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lazy') diff --git a/lazy/src/responsive.rs b/lazy/src/responsive.rs index da7bb408..58d151ec 100644 --- a/lazy/src/responsive.rs +++ b/lazy/src/responsive.rs @@ -268,7 +268,9 @@ where hasher.finish() }; - if new_layout_hash != state.last_layout_hash { + if state.last_size != Some(state.last_layout.size()) + || new_layout_hash != state.last_layout_hash + { state.last_layout = element.layout( renderer.deref(), &layout::Limits::new( -- cgit