diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-02-07 16:32:38 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-02-07 16:32:38 +0400 |
| commit | 753a90430abbdf166a86b95c5c69aa1e68b3c412 (patch) | |
| tree | 78491ad15f528bb30b8a7755b6d7a45f1ad17270 /src/config_error_notification.rs | |
| parent | f9085db5648bc6bad7fb0abf45e2a11f2e03d1af (diff) | |
| download | niri-753a90430abbdf166a86b95c5c69aa1e68b3c412.tar.gz niri-753a90430abbdf166a86b95c5c69aa1e68b3c412.tar.bz2 niri-753a90430abbdf166a86b95c5c69aa1e68b3c412.zip | |
animation: Accept ms as u32
Less boilerplate elsewhere.
Diffstat (limited to 'src/config_error_notification.rs')
| -rw-r--r-- | src/config_error_notification.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/config_error_notification.rs b/src/config_error_notification.rs index 73ae3d9b..b80e8d27 100644 --- a/src/config_error_notification.rs +++ b/src/config_error_notification.rs @@ -58,7 +58,7 @@ impl ConfigErrorNotification { self.buffers.borrow_mut().clear(); } - self.state = State::Showing(Animation::new(0., 1., Duration::from_millis(250))); + self.state = State::Showing(Animation::new(0., 1., 250)); } pub fn show(&mut self) { @@ -68,7 +68,7 @@ impl ConfigErrorNotification { } // Show from scratch even if already showing to bring attention. - self.state = State::Showing(Animation::new(0., 1., Duration::from_millis(250))); + self.state = State::Showing(Animation::new(0., 1., 250)); } pub fn hide(&mut self) { @@ -76,7 +76,7 @@ impl ConfigErrorNotification { return; } - self.state = State::Hiding(Animation::new(1., 0., Duration::from_millis(250))); + self.state = State::Hiding(Animation::new(1., 0., 250)); } pub fn advance_animations(&mut self, target_presentation_time: Duration) { |
