root item is an Item

MouseEventListener moved down
This commit is contained in:
Marco Martin 2015-06-19 13:03:02 -07:00
parent 7c3a8d90c2
commit 4a1c477fba

View file

@ -26,7 +26,7 @@ import org.kde.kquickcontrolsaddons 2.0
import "LayoutManager.js" as LayoutManager import "LayoutManager.js" as LayoutManager
MouseEventListener { Item {
id: root id: root
width: 480 width: 480
height: 640 height: 640
@ -143,6 +143,43 @@ MouseEventListener {
} }
} }
SequentialAnimation {
id: clickFedbackAnimation
property Item target
NumberAnimation {
target: clickFedbackAnimation.target
properties: "scale"
to: 2
duration: units.longDuration
easing.type: Easing.InOutQuad
}
PauseAnimation {
duration: units.shortDuration
}
NumberAnimation {
target: clickFedbackAnimation.target
properties: "scale"
to: 1
duration: units.longDuration
easing.type: Easing.InOutQuad
}
}
FeedbackWindow {
id: feedbackWindow
}
KRunner {
id: krunner
z: 1000
anchors {
top: parent.top
left: parent.left
right: parent.right
topMargin: plasmoid.availableScreenRect.y
}
}
MouseEventListener {
anchors.fill: parent
onPressAndHold: { onPressAndHold: {
if (krunner.showingResults) { if (krunner.showingResults) {
return; return;
@ -266,40 +303,6 @@ MouseEventListener {
clickFedbackAnimation.target = item; clickFedbackAnimation.target = item;
clickFedbackAnimation.running = true; clickFedbackAnimation.running = true;
} }
SequentialAnimation {
id: clickFedbackAnimation
property Item target
NumberAnimation {
target: clickFedbackAnimation.target
properties: "scale"
to: 2
duration: units.longDuration
easing.type: Easing.InOutQuad
}
PauseAnimation {
duration: units.shortDuration
}
NumberAnimation {
target: clickFedbackAnimation.target
properties: "scale"
to: 1
duration: units.longDuration
easing.type: Easing.InOutQuad
}
}
FeedbackWindow {
id: feedbackWindow
}
KRunner {
id: krunner
z: 1000
anchors {
top: parent.top
left: parent.left
right: parent.right
topMargin: plasmoid.availableScreenRect.y
}
}
PlasmaCore.ColorScope { PlasmaCore.ColorScope {
anchors.fill: parent anchors.fill: parent
@ -606,3 +609,4 @@ MouseEventListener {
} }
} }
} }
}