on xenial help sign in
Remove highlight when going over a non clickable item
commita8445f73aae755f4bdf3725aefdbaa7c6e817659 authorAlbert Astals Cid <albert.astals@canonical.com> dateMon 20 Mar 2017, 14:10 (10 years ago) parent604cd88
2 files changed+9−1
qml/Launcher/LauncherPanel.qml+2 tests/qmltests/Launcher/tst_Launcher.qml+7−1
qml/Launcher/LauncherPanel.qml+2
@@ -813,6 +813,8 @@ Rectangle {
813813 var item = quickListColumn.childAt(mouseX, mouseY);
814814 if (item.clickable) {
815815 quickList.selectedIndex = item.index;
816+ } else {
817+ quickList.selectedIndex = -1;
816818 }
817819 }
818820 }
tests/qmltests/Launcher/tst_Launcher.qml+7−1
@@ -1509,7 +1509,7 @@ Rectangle {
15091509 // Initial state
15101510 tryCompare(quickList, "state", "")
15111511
1512− // Doing longpress
1512+ // Open quickList
15131513 mouseClick(clickedItem, clickedItem.width / 2, clickedItem.height / 2, Qt.RightButton)
15141514 verify(quickList, "state", "open")
15151515 compare(quickList.selectedIndex, -1)
@@ -1519,6 +1519,12 @@ Rectangle {
15191519 mouseMove(qEntry, qEntry.width / 2 + 1, qEntry.height / 2, 10);
15201520
15211521 tryCompare(quickList, "selectedIndex", 0)
1522+
1523+ qEntry = findChild(launcher, "quickListEntry1");
1524+ mouseMove(qEntry, qEntry.width / 2 , qEntry.height / 2, 10);
1525+ mouseMove(qEntry, qEntry.width / 2 + 1, qEntry.height / 2, 10);
1526+
1527+ tryCompare(quickList, "selectedIndex", -1)
15221528 }
15231529 }
15241530}