Skip to content

How to disable animation when the window resizing? #5569

Answered by ogoffart
capvor asked this question in Q&A
Discussion options

You must be logged in to vote

There is no way to specificly disable animation when resizong, but i can come with a few ideas as a workaround:

  • Set the animation using states and transition and only animate when the states are changing.
  • Animate an intermediate property instead of x directly.

So in code: (haven't tried it)

// with state
PrintPage {
    x: parent.width + parent.x + 2px;
    states [ active when root.current-subpage == 1 : { 
       x: 0;
       in { animate x { duration: 125ms; easing: ease; } }
       out { animate x { duration: 125ms; easing: ease; } }
    } ]
}

/// with intermediate property
PrintPage {
    x: animation * (parent.width + parent.x + 2px);
    property <float> animation: root.current-…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by capvor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants