forge
Explore
Log in

Don't you dare go Hollow

Use movement anim for view anim during movement

Browse files at this commit

dfe49aa70567fc48c0b34dccddc17fd907a6b60cIvan MolodetskikhParent: 7ca39ba
src/layout/workspace.rsmodified+14 -2
@@ -651,12 +651,24 @@ impl<W: LayoutElement> Workspace<W> {
651651 }
652652
653653 fn activate_column(&mut self, idx: usize) {
654+ self.activate_column_with_anim_config(
655+ idx,
656+ self.options.animations.horizontal_view_movement.0,
657+ );
658+ }
659+
660+ fn activate_column_with_anim_config(&mut self, idx: usize, config: niri_config::Animation) {
654661 if self.active_column_idx == idx {
655662 return;
656663 }
657664
658665 let current_x = self.view_pos();
659- self.animate_view_offset_to_column(current_x, idx, Some(self.active_column_idx));
666+ self.animate_view_offset_to_column_with_config(
667+ current_x,
668+ idx,
669+ Some(self.active_column_idx),
670+ config,
671+ );
660672
661673 self.active_column_idx = idx;
662674
@@ -1315,7 +1327,7 @@ impl<W: LayoutElement> Workspace<W> {
13151327 }
13161328 }
13171329
1318- self.activate_column(new_idx);
1330+ self.activate_column_with_anim_config(new_idx, self.options.animations.window_movement.0);
13191331 }
13201332
13211333 pub fn move_left(&mut self) {