WIP: add Qt Quick HomeScreen UI
[staging/HomeScreen.git] / HomeScreenNG / qml / ShortcutIcon.qml
1 import QtQuick 2.6
2
3 MouseArea {
4     id: root
5     width: 195
6     height: 216.8
7     property string name: 'Home'
8     property bool active: false
9     Image {
10         id: icon
11         anchors.fill: parent
12         source: './images/Shortcut/HMI_Shortcut_%1-01.png'.arg(root.name)
13     }
14     Image {
15         anchors.fill: parent
16         source: './images/Shortcut/HMI_Shortcut_%1_Active-01.png'.arg(root.name)
17         opacity: 1.0 - icon.opacity
18     }
19     states: [
20         State {
21             when: root.active
22             PropertyChanges {
23                 target: icon
24                 opacity: 0.0
25             }
26         }
27     ]
28
29     transitions: [
30         Transition {
31             NumberAnimation {
32                 properties: 'opacity'
33                 easing.type: Easing.OutExpo
34             }
35         }
36     ]
37 }