Finish keyboard navigation for GridViews and MenuItems

This commit is contained in:
Cameron Gutman
2018-09-23 19:06:26 -07:00
parent 2e3de32810
commit 8fb37ae229
6 changed files with 30 additions and 7 deletions
+7 -2
View File
@@ -31,6 +31,11 @@ GridView {
stackView.pop()
}
Component.onCompleted: {
// Don't show any highlighted item until interacting with them
currentIndex = -1
}
onVisibleChanged: {
if (visible) {
appModel.computerLost.connect(computerLost)
@@ -51,7 +56,7 @@ GridView {
delegate: NavigableItemDelegate {
width: 200; height: 335;
grid: pcGrid
grid: appGrid
Image {
id: appIcon
@@ -129,7 +134,7 @@ GridView {
}
height: visible ? implicitHeight : 0
}
MenuItem {
NavigableMenuItem {
text: "Quit Game"
onTriggered: {
quitAppDialog.appName = appModel.getRunningAppName()