slint icon indicating copy to clipboard operation
slint copied to clipboard

Add `enabled` property to animations to toggle them on/off

Open task-jp opened this issue 3 months ago • 1 comments

This adds an enabled boolean property to the animate block, which defaults to true. When set to false, property changes apply immediately without animation, bypassing duration, easing, and iterations.

  • Added enabled field to PropertyAnimation struct
  • Updated compiler to handle enabled property with proper defaults
  • Added runtime check to skip animation when disabled
  • Included comprehensive tests for static and dynamic enabled values
  • Updated documentation and CHANGELOG

task-jp avatar Oct 03 '25 07:10 task-jp

Thank you for your review. I understood that this won't be useful until #348 is done. I'll try to fix #348 first.