mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Add support for back key on desktop keyboard
This commit is contained in:
parent
0a17cbefec
commit
d19950f0df
@ -193,6 +193,25 @@ ApplicationWindow
|
|||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
focus: true
|
focus: true
|
||||||
onCurrentItemChanged:
|
onCurrentItemChanged:
|
||||||
|
{
|
||||||
|
if (currentItem)
|
||||||
|
{
|
||||||
|
currentItem.forceActiveFocus()
|
||||||
|
setStatus (currentItem)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Keys.onReleased:
|
||||||
|
{
|
||||||
|
if ((event.key === Qt.Key_Back || Qt.Key_Backspace) && stackView.depth > 1)
|
||||||
|
{
|
||||||
|
stackView.pop();
|
||||||
|
event.accepted = true;
|
||||||
|
setStatus (stackView.currentItem)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function setStatus (currentItem)
|
||||||
{
|
{
|
||||||
if (currentItem)
|
if (currentItem)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user