Clear default member list highlight on focus loss

This commit is contained in:
miruka 2020-07-10 12:20:02 -04:00
parent 27b914b0bf
commit e5a196dcf8

View File

@ -84,11 +84,22 @@ HColumnLayout {
py.callCoro("set_substring_filter", [modelSyncId, text])
}
onFocusChanged: if (
focus &&
onActiveFocusChanged: {
if (
activeFocus &&
stackView.depth === 1 &&
stackView.currentItem.currentIndex === -1
) stackView.currentItem.currentIndex = 0
) {
stackView.currentItem.currentIndex = 0
} else if (
! activeFocus &&
stackView.depth === 1 &&
stackView.currentItem.currentIndex === 0
) {
stackView.currentItem.currentIndex = -1
}
}
Keys.forwardTo: [stackView.currentItem]
Keys.priority: Keys.AfterItem