diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-02-07 17:05:15 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-02-07 17:14:24 +0400 |
| commit | 6424a2738db6349de62dab150d5d6f1d431ca6c4 (patch) | |
| tree | 39adaf858ec3ee8661a40be6b4792df215ab4368 /src/layout/tile.rs | |
| parent | 753a90430abbdf166a86b95c5c69aa1e68b3c412 (diff) | |
| download | niri-6424a2738db6349de62dab150d5d6f1d431ca6c4.tar.gz niri-6424a2738db6349de62dab150d5d6f1d431ca6c4.tar.bz2 niri-6424a2738db6349de62dab150d5d6f1d431ca6c4.zip | |
Make all animations configurable
Diffstat (limited to 'src/layout/tile.rs')
| -rw-r--r-- | src/layout/tile.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/layout/tile.rs b/src/layout/tile.rs index be96f6e6..62f79a77 100644 --- a/src/layout/tile.rs +++ b/src/layout/tile.rs @@ -11,7 +11,7 @@ use smithay::utils::{Logical, Point, Rectangle, Scale, Size}; use super::focus_ring::FocusRing; use super::{LayoutElement, LayoutElementRenderElement, Options}; -use crate::animation::{Animation, Curve}; +use crate::animation::Animation; use crate::niri_render_elements; use crate::render_helpers::offscreen::OffscreenRenderElement; use crate::render_helpers::renderer::NiriRenderer; @@ -114,7 +114,12 @@ impl<W: LayoutElement> Tile<W> { } pub fn start_open_animation(&mut self) { - self.open_animation = Some(Animation::new(0., 1., 150).with_curve(Curve::EaseOutExpo)); + self.open_animation = Some(Animation::new( + 0., + 1., + self.options.animations.window_open, + niri_config::Animation::default_window_open(), + )); } pub fn window(&self) -> &W { |
