Allow focus to move up to the toolbar from the PC/app grid
This commit is contained in:
parent
d040bd24d1
commit
f4712718cb
2 changed files with 11 additions and 0 deletions
|
|
@ -123,6 +123,9 @@ CenteredGridView {
|
||||||
|
|
||||||
sourceComponent: Item {
|
sourceComponent: Item {
|
||||||
RoundButton {
|
RoundButton {
|
||||||
|
// Don't steal focus from the toolbar buttons
|
||||||
|
focusPolicy: Qt.NoFocus
|
||||||
|
|
||||||
anchors.horizontalCenterOffset: appIcon.isPlaceholder ? -47 : 0
|
anchors.horizontalCenterOffset: appIcon.isPlaceholder ? -47 : 0
|
||||||
anchors.verticalCenterOffset: appIcon.isPlaceholder ? -75 : -60
|
anchors.verticalCenterOffset: appIcon.isPlaceholder ? -75 : -60
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
|
@ -146,6 +149,9 @@ CenteredGridView {
|
||||||
}
|
}
|
||||||
|
|
||||||
RoundButton {
|
RoundButton {
|
||||||
|
// Don't steal focus from the toolbar buttons
|
||||||
|
focusPolicy: Qt.NoFocus
|
||||||
|
|
||||||
anchors.horizontalCenterOffset: appIcon.isPlaceholder ? 47 : 0
|
anchors.horizontalCenterOffset: appIcon.isPlaceholder ? 47 : 0
|
||||||
anchors.verticalCenterOffset: appIcon.isPlaceholder ? -75 : 60
|
anchors.verticalCenterOffset: appIcon.isPlaceholder ? -75 : 60
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,11 @@ ItemDelegate {
|
||||||
}
|
}
|
||||||
Keys.onUpPressed: {
|
Keys.onUpPressed: {
|
||||||
grid.moveCurrentIndexUp()
|
grid.moveCurrentIndexUp()
|
||||||
|
|
||||||
|
// If we've reached the top of the grid, move focus to the toolbar
|
||||||
|
if (grid.currentItem === this) {
|
||||||
|
nextItemInFocusChain(false).forceActiveFocus(Qt.TabFocus)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Keys.onReturnPressed: {
|
Keys.onReturnPressed: {
|
||||||
clicked()
|
clicked()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue