change a11y zoom easing function from EaseInOutCubic to Linear to avoid lagging mouse wheel scroll

This commit is contained in:
Tom Grushka 2026-05-19 17:46:21 -06:00
parent 657f0aeddf
commit c776eeac03

View file

@ -9,7 +9,7 @@ use cosmic::{
}; };
use cosmic_comp_config::ZoomMovement; use cosmic_comp_config::ZoomMovement;
use cosmic_config::ConfigSet; use cosmic_config::ConfigSet;
use keyframe::{ease, functions::EaseInOutCubic}; use keyframe::{ease, functions::Linear};
use smithay::{ use smithay::{
backend::renderer::{ImportMem, Renderer, element::AsRenderElements}, backend::renderer::{ImportMem, Renderer, element::AsRenderElements},
desktop::space::SpaceElement, desktop::space::SpaceElement,
@ -135,7 +135,7 @@ impl OutputZoomState {
let percentage = let percentage =
duration_since.as_millis() as f32 / ANIMATION_DURATION.as_millis() as f32; duration_since.as_millis() as f32 / ANIMATION_DURATION.as_millis() as f32;
ease( ease(
EaseInOutCubic, Linear,
EasePoint(*old_point), EasePoint(*old_point),
EasePoint(self.focal_point), EasePoint(self.focal_point),
percentage, percentage,
@ -159,7 +159,7 @@ impl OutputZoomState {
let percentage = Instant::now().duration_since(*start).as_millis() as f32 let percentage = Instant::now().duration_since(*start).as_millis() as f32
/ ANIMATION_DURATION.as_millis() as f32; / ANIMATION_DURATION.as_millis() as f32;
ease(EaseInOutCubic, *old_level, self.level, percentage) ease(Linear, *old_level, self.level, percentage)
} else { } else {
self.level self.level
} }