forge
Explore
Log in

Don't you dare go Hollow

layout/scrolling: Update view offset on config update

Browse files at this commit

6c9705dd4b2eaba25f024d1a3efd7943fd393632Ivan MolodetskikhParent: eb590c5
Fix always-centering not applied right away. No other changes intended.
src/layout/scrolling.rsmodified+5 -0
@@ -293,6 +293,11 @@ impl<W: LayoutElement> ScrollingSpace<W> {
293293 self.working_area = working_area;
294294 self.scale = scale;
295295 self.options = options;
296+
297+ // Apply always-center and such right away.
298+ if !self.columns.is_empty() && !self.view_offset.is_gesture() {
299+ self.animate_view_offset_to_column(None, self.active_column_idx, None);
300+ }
296301 }
297302
298303 pub fn update_shaders(&mut self) {