From 56607817112410d7a25cddc81aa7d652fc536cb9 Mon Sep 17 00:00:00 2001 From: wang_zhiqiang Date: Wed, 17 Oct 2018 08:56:06 +0800 Subject: make applist flickable Change-Id: I2a2a4a56b0d3d3e635f73cc7519171d67182c893 --- launcher/qml/IconItem.qml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'launcher/qml/IconItem.qml') diff --git a/launcher/qml/IconItem.qml b/launcher/qml/IconItem.qml index c15a3da..8171bef 100644 --- a/launcher/qml/IconItem.qml +++ b/launcher/qml/IconItem.qml @@ -22,13 +22,17 @@ Item { id: main width: 320 height: 320 + x: main.x + y: main.y property string icon: model.icon Item { id: container parent: loc - x: main.x - y: main.y +// x: main.x +// y: main.y + x: main.x - loc.r_mouseX + loc.mouseX + y: main.y - loc.r_mouseY + loc.mouseY width: main.width height: main.height @@ -85,8 +89,8 @@ Item { text: qsTr(model.name.toUpperCase()) } - 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 } } + Behavior on x { enabled: item.state !== 'active' && loc.flicking == false ; NumberAnimation { duration: 400; easing.type: Easing.OutCubic } } + Behavior on y { enabled: item.state !== 'active' && loc.flicking == false ; NumberAnimation { duration: 400; easing.type: Easing.OutCubic } } SequentialAnimation on rotation { NumberAnimation { to: 5; duration: 100 } NumberAnimation { to: -5; duration: 200 } @@ -112,6 +116,8 @@ Item { target: container scale: 0.85 opacity: 0.75 + x: main.x - loc.r_mouseX + loc.mouseX + y: main.y - loc.r_mouseY + loc.mouseY } } ] -- cgit 1.2.3-korg