Animations

Purpose

Animation can be an effective tool in guiding user focus towards newly changed elements, and to avoid sudden glaring changes.

Animations can exist also exclusively for visual flair. This is not covered by this HIG.

Guidelines

Default animations should be as follows:

  • Items animating from visible to invisible should be InCubic

  • Items animating from invisible to visible should be OutCubic

  • Items animating from visible to visible should be InOutCubic

Where going off screen or out of the window is considered as going invisible.

Code

Kirigami

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
...
import QtQuick 2.2
...

Kirigami.ApplicationWindow {
    ...
    Rectangle {
        ...
        NumberAnimation on y {
            running: true
            to: 30
            duration: Kirigami.Units.shortDuration
            easing.type: Easing.InOutQuad
        }
    }
    ...
}