Add: frames to each state, more smooth animation

This commit is contained in:
DaZuo0122
2026-02-15 16:51:17 +08:00
parent 832fbda04d
commit bed7a052f3
9 changed files with 58 additions and 48 deletions

View File

@@ -11,7 +11,7 @@ use tokio::sync::{mpsc, Mutex};
use tracing::warn;
const TAURI_ANIMATION_SLOWDOWN_FACTOR_MIN: u8 = 1;
const TAURI_ANIMATION_SLOWDOWN_FACTOR_MAX: u8 = 20;
const TAURI_ANIMATION_SLOWDOWN_FACTOR_MAX: u8 = 200;
#[derive(Debug, Error)]
pub enum RuntimeCoreError {
@@ -628,6 +628,15 @@ mod tests {
core.frontend_tauri_animation_slowdown_factor().expect("get"),
1
);
let upper = core
.set_frontend_tauri_animation_slowdown_factor(201)
.expect("set high");
assert_eq!(upper, 200);
assert_eq!(
core.frontend_tauri_animation_slowdown_factor().expect("get"),
200
);
}
#[test]