Git commit d9e2f2289c0aebf2fc77a2899157fda9f57726a6 by Shaun Reich. Committed on 01/03/2012 at 00:02. Pushed by sreich into branch 'plasma/sreich/sal-qml'. add highlight item to the gridview, instead of making it per Result item M +0 -20 plasma/netbook/containments/sal/package/contents/ui/Result.q= ml M +23 -7 plasma/netbook/containments/sal/package/contents/ui/ResultsV= iew.qml http://commits.kde.org/kde-workspace/d9e2f2289c0aebf2fc77a2899157fda9f57726= a6 diff --git a/plasma/netbook/containments/sal/package/contents/ui/Result.qml= b/plasma/netbook/containments/sal/package/contents/ui/Result.qml index 78499e7..69ed2d9 100644 --- a/plasma/netbook/containments/sal/package/contents/ui/Result.qml +++ b/plasma/netbook/containments/sal/package/contents/ui/Result.qml @@ -66,18 +66,7 @@ Item { } } = - PlasmaComponents.Highlight { - id: highlighter - anchors.fill: parent - hover: true - opacity: 0 = - Behavior on opacity { - NumberAnimation { - duration: 150 - } - } - } = MouseArea { anchors.fill: parent @@ -91,14 +80,5 @@ Item { wasClicked =3D false wasClicked =3D true } - - onEntered: { - highlighter.opacity =3D 1 - } - - onExited: { - highlighter.opacity =3D 0 - } - } } \ No newline at end of file diff --git a/plasma/netbook/containments/sal/package/contents/ui/ResultsVie= w.qml b/plasma/netbook/containments/sal/package/contents/ui/ResultsView.qml index ed1db4b..ce93218 100644 --- a/plasma/netbook/containments/sal/package/contents/ui/ResultsView.qml +++ b/plasma/netbook/containments/sal/package/contents/ui/ResultsView.qml @@ -46,13 +46,9 @@ Item { rightMargin: resultItemHeight } = -// move: Transition { -// PropertyAnimation { -// properties: "x,y" -// easing.type: Easing.InOutQuad -// } -// } -// + highlightFollowsCurrentItem: true + + highlight: highlight delegate: Result { id: result currentText: model["label"] @@ -63,6 +59,15 @@ Item { print(result.currentId) // appIndexToRun =3D result.currentIndex: } + + MouseArea { + anchors.fill: parent + hoverEnabled: true + + onEntered: { + gridView.currentIndex =3D index + } + } } } } @@ -76,4 +81,15 @@ Item { bottom: parent.bottom } } + + Component { + id: highlight + + PlasmaComponents.Highlight { + id: highlighter + // anchors.fill: parent + hover: true + } + + } } \ No newline at end of file