forge
Explore
Log in

Don't you dare go Hollow

layout: Add animate_move_from_with_config()

Browse files at this commit

ded793dc071f4b9013a109f8d4a6176c373607dfIvan MolodetskikhParent: 60a5362
src/layout/scrolling.rsmodified+10 -2
@@ -4203,8 +4203,16 @@ impl<W: LayoutElement> Column<W> {
42034203 }
42044204
42054205 pub fn animate_move_from(&mut self, from: Point<f64, Logical>) {
4206- self.animate_move_x_from(from.x);
4207- self.animate_move_y_from(from.y);
4206+ self.animate_move_from_with_config(from, self.options.animations.window_movement.0);
4207+ }
4208+
4209+ pub fn animate_move_from_with_config(
4210+ &mut self,
4211+ from: Point<f64, Logical>,
4212+ config: niri_config::Animation,
4213+ ) {
4214+ self.animate_move_x_from_with_config(from.x, config);
4215+ self.animate_move_y_from_with_config(from.y, config);
42084216 }
42094217
42104218 pub fn animate_move_x_from(&mut self, from_x_offset: f64) {
src/layout/tile.rsmodified+10 -2
@@ -573,8 +573,16 @@ impl<W: LayoutElement> Tile<W> {
573573 }
574574
575575 pub fn animate_move_from(&mut self, from: Point<f64, Logical>) {
576- self.animate_move_x_from(from.x);
577- self.animate_move_y_from(from.y);
576+ self.animate_move_from_with_config(from, self.options.animations.window_movement.0);
577+ }
578+
579+ pub fn animate_move_from_with_config(
580+ &mut self,
581+ from: Point<f64, Logical>,
582+ config: niri_config::Animation,
583+ ) {
584+ self.animate_move_x_from_with_config(from.x, config);
585+ self.animate_move_y_from_with_config(from.y, config);
578586 }
579587
580588 pub fn animate_move_x_from(&mut self, from: f64) {