From 381755e4686a08e766316aaf40e8fdfa202d48d4 Mon Sep 17 00:00:00 2001 From: zheng_wenlong Date: Fri, 29 Sep 2017 21:00:25 +0900 Subject: Add homescreen-2017 Add new homescreen-2017 with agl-service-windowmanaeger-2017 and agl-service-homescreen-2017. About this information see JIRA SPEC-871. [PatchSet2] Use aglwgt make package. Delete homescreensimulator and sampleapptimedate beacuse not use them. Change-Id: I402134d0386e76b2127ca95b9b0b48c1721b4086 Signed-off-by: zheng_wenlong --- homescreen/qml/IconItem.qml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 homescreen/qml/IconItem.qml (limited to 'homescreen/qml/IconItem.qml') diff --git a/homescreen/qml/IconItem.qml b/homescreen/qml/IconItem.qml new file mode 100644 index 0000000..59131c0 --- /dev/null +++ b/homescreen/qml/IconItem.qml @@ -0,0 +1,37 @@ +import QtQuick 2.0 + +Item { + id: main + Image { + id: item; parent: loc + x: main.x + 5; y: main.y + 5 + width: main.width - 10; height: main.height - 10; + source: './images/HMI_AppLauncher_%1_%2-01.png'.arg(model.icon).arg(loc.pressed && (loc.index === model.index || loc.currentId === model.id) ? 'Active' : 'Inactive') + antialiasing: item.state !== '' + Behavior on x { enabled: item.state !== 'active'; NumberAnimation { duration: 400; easing.type: Easing.OutCubic } } + Behavior on y { enabled: item.state !== 'active'; NumberAnimation { duration: 400; easing.type: Easing.OutCubic } } + SequentialAnimation on rotation { + NumberAnimation { to: 5; duration: 100 } + NumberAnimation { to: -5; duration: 200 } + NumberAnimation { to: 0; duration: 100 } + running: loc.currentId !== '' && item.state !== 'active' + loops: Animation.Infinite; alwaysRunToEnd: true + } + states: [ + State { + name: 'active' + when: loc.currentId == model.id + PropertyChanges { target: item; x: loc.mouseX - width/2; y: loc.mouseY - height/2; scale: 1.15; z: 10 } + }, + State { + when: loc.currentId !== '' + PropertyChanges { + target: item + scale: 0.85 + opacity: 0.75 + } + } + ] + transitions: Transition { NumberAnimation { properties: 'scale, opacity, x, y'; duration: 150; easing.type: Easing.OutCubic} } + } +} -- cgit 1.2.3-korg