From 6bf5bbd0ab5abab05305667a516c069c7c5556f4 Mon Sep 17 00:00:00 2001 From: Tasuku Suzuki Date: Fri, 2 Dec 2016 11:19:51 +0900 Subject: WIP: add Qt Quick HomeScreen UI Change-Id: I2be964f6d9e76df616169d7b2654d17ae9446687 Signed-off-by: Tasuku Suzuki --- HomeScreenNG/qml/ShortcutIcon.qml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 HomeScreenNG/qml/ShortcutIcon.qml (limited to 'HomeScreenNG/qml/ShortcutIcon.qml') diff --git a/HomeScreenNG/qml/ShortcutIcon.qml b/HomeScreenNG/qml/ShortcutIcon.qml new file mode 100644 index 0000000..84550d9 --- /dev/null +++ b/HomeScreenNG/qml/ShortcutIcon.qml @@ -0,0 +1,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 + } + } + ] +} -- cgit 1.2.3-korg