aboutsummaryrefslogtreecommitdiff
path: root/src/ui/config_error_notification.rs
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2024-04-10 11:28:49 +0400
committerIvan Molodetskikh <yalterz@gmail.com>2024-04-10 11:28:49 +0400
commit5383a0591f22b9640a570e299a73706eb4a27ffc (patch)
treef1ead9293eaf63676573494c9d0b3571fc3698eb /src/ui/config_error_notification.rs
parent0c686090637f51caee2dd2fea2223a3c5bc4995b (diff)
downloadniri-5383a0591f22b9640a570e299a73706eb4a27ffc.tar.gz
niri-5383a0591f22b9640a570e299a73706eb4a27ffc.tar.bz2
niri-5383a0591f22b9640a570e299a73706eb4a27ffc.zip
Use clamped animations where it makes sense
Diffstat (limited to 'src/ui/config_error_notification.rs')
-rw-r--r--src/ui/config_error_notification.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/ui/config_error_notification.rs b/src/ui/config_error_notification.rs
index b9e68e8e..d49ab4f0 100644
--- a/src/ui/config_error_notification.rs
+++ b/src/ui/config_error_notification.rs
@@ -119,9 +119,7 @@ impl ConfigErrorNotification {
}
State::Hiding(anim) => {
anim.set_current_time(target_presentation_time);
- // HACK: prevent bounciness on hiding. This is better done with a clamp property on
- // the spring animation.
- if anim.is_done() || anim.value() <= 0. {
+ if anim.is_clamped_done() {
self.state = State::Hidden;
}
}