diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-04-17 14:29:22 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-04-17 14:29:22 +0400 |
| commit | dfe49aa70567fc48c0b34dccddc17fd907a6b60c (patch) | |
| tree | 92a1c79fe49340071807c6490b6870e944e4a93f /src/layout/workspace.rs | |
| parent | 7ca39baf9e54103e4f0dc3efae59284662055870 (diff) | |
| download | niri-dfe49aa70567fc48c0b34dccddc17fd907a6b60c.tar.gz niri-dfe49aa70567fc48c0b34dccddc17fd907a6b60c.tar.bz2 niri-dfe49aa70567fc48c0b34dccddc17fd907a6b60c.zip | |
Use movement anim for view anim during movement
Diffstat (limited to 'src/layout/workspace.rs')
| -rw-r--r-- | src/layout/workspace.rs | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/layout/workspace.rs b/src/layout/workspace.rs index 89486272..01aca338 100644 --- a/src/layout/workspace.rs +++ b/src/layout/workspace.rs @@ -651,12 +651,24 @@ impl<W: LayoutElement> Workspace<W> { } fn activate_column(&mut self, idx: usize) { + self.activate_column_with_anim_config( + idx, + self.options.animations.horizontal_view_movement.0, + ); + } + + fn activate_column_with_anim_config(&mut self, idx: usize, config: niri_config::Animation) { if self.active_column_idx == idx { return; } let current_x = self.view_pos(); - self.animate_view_offset_to_column(current_x, idx, Some(self.active_column_idx)); + self.animate_view_offset_to_column_with_config( + current_x, + idx, + Some(self.active_column_idx), + config, + ); self.active_column_idx = idx; @@ -1315,7 +1327,7 @@ impl<W: LayoutElement> Workspace<W> { } } - self.activate_column(new_idx); + self.activate_column_with_anim_config(new_idx, self.options.animations.window_movement.0); } pub fn move_left(&mut self) { |
