aboutsummaryrefslogtreecommitdiffstats
path: root/HomeScreenNG/qml/ShortcutIcon.qml
blob: 84550d9e120869ca3cdbd78b44b70dc20be67324 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import QtQuick 2.6

MouseArea {
    id: root
    width: 195
    height: 216.8
    property string name: 'Home'
    property bool active: false
    Image {
        id: icon
        anchors.fill: parent
        source: './images/Shortcut/HMI_Shortcut_%1-01.png'.arg(root.name)
    }
    Image {
        anchors.fill: parent
        source: './images/Shortcut/HMI_Shortcut_%1_Active-01.png'.arg(root.name)
        opacity: 1.0 - icon.opacity
    }
    states: [
        State {
            when: root.active
            PropertyChanges {
                target: icon
                opacity: 0.0
            }
        }
    ]

    transitions: [
        Transition {
            NumberAnimation {
                properties: 'opacity'
                easing.type: Easing.OutExpo
            }
        }
    ]
}