From 6c9705dd4b2eaba25f024d1a3efd7943fd393632 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Thu, 1 May 2025 21:34:46 +0300 Subject: layout/scrolling: Update view offset on config update Fix always-centering not applied right away. No other changes intended. --- src/layout/scrolling.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/layout/scrolling.rs') diff --git a/src/layout/scrolling.rs b/src/layout/scrolling.rs index 7e9df56d..5f746915 100644 --- a/src/layout/scrolling.rs +++ b/src/layout/scrolling.rs @@ -293,6 +293,11 @@ impl ScrollingSpace { self.working_area = working_area; self.scale = scale; self.options = options; + + // Apply always-center and such right away. + if !self.columns.is_empty() && !self.view_offset.is_gesture() { + self.animate_view_offset_to_column(None, self.active_column_idx, None); + } } pub fn update_shaders(&mut self) { -- cgit