Fixed keyboard navigation
This commit is contained in:
parent
7c3d5d6699
commit
c53b0a87a2
1 changed files with 33 additions and 21 deletions
|
|
@ -177,9 +177,6 @@ Rectangle
|
||||||
width: areaMain.width
|
width: areaMain.width
|
||||||
height: areaMain.height
|
height: areaMain.height
|
||||||
|
|
||||||
Keys.onTabPressed: { root.state = "stateSessions" }
|
|
||||||
Keys.onBacktabPressed: { root.state = "stateUsers" }
|
|
||||||
|
|
||||||
Behavior on x { NumberAnimation { duration: 150 } }
|
Behavior on x { NumberAnimation { duration: 150 } }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -189,15 +186,6 @@ Rectangle
|
||||||
width: areaMain.width
|
width: areaMain.width
|
||||||
height: areaMain.height
|
height: areaMain.height
|
||||||
|
|
||||||
Keys.onTabPressed: { root.state = "stateUsers" }
|
|
||||||
Keys.onBacktabPressed:
|
|
||||||
{
|
|
||||||
if (buttonPagePower.enabled)
|
|
||||||
root.state = "statePower"
|
|
||||||
else
|
|
||||||
root.state = "stateSessions"
|
|
||||||
}
|
|
||||||
|
|
||||||
Behavior on x { NumberAnimation { duration: 150 } }
|
Behavior on x { NumberAnimation { duration: 150 } }
|
||||||
|
|
||||||
onSelectedIndexChanged: pageUsers.selectedSessionIndex = selectedIndex
|
onSelectedIndexChanged: pageUsers.selectedSessionIndex = selectedIndex
|
||||||
|
|
@ -211,15 +199,6 @@ Rectangle
|
||||||
width: areaMain.width
|
width: areaMain.width
|
||||||
height: areaMain.height
|
height: areaMain.height
|
||||||
|
|
||||||
Keys.onTabPressed:
|
|
||||||
{
|
|
||||||
if (buttonPagePower.enabled)
|
|
||||||
root.state = "statePower"
|
|
||||||
else
|
|
||||||
root.state = "stateSessions"
|
|
||||||
}
|
|
||||||
Keys.onBacktabPressed: { root.state = "stateSessions" }
|
|
||||||
|
|
||||||
Behavior on x { NumberAnimation { duration: 150 } }
|
Behavior on x { NumberAnimation { duration: 150 } }
|
||||||
|
|
||||||
onLockNav: areaTop.enabled = false
|
onLockNav: areaTop.enabled = false
|
||||||
|
|
@ -396,5 +375,38 @@ Rectangle
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Keys.onTabPressed: {
|
||||||
|
switch(root.state)
|
||||||
|
{
|
||||||
|
case "statePower":
|
||||||
|
root.state = "stateSessions";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "stateSessions":
|
||||||
|
root.state = "stateUsers";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "stateUsers":
|
||||||
|
root.state = (buttonPagePower.enabled) ? "statePower" : "stateSessions";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Keys.onBacktabPressed: {
|
||||||
|
switch(root.state)
|
||||||
|
{
|
||||||
|
case "statePower":
|
||||||
|
root.state = "stateUsers";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "stateSessions":
|
||||||
|
root.state = (buttonPagePower.enabled) ? "statePower" : "stateUsers";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "stateUsers":
|
||||||
|
root.state = "stateSessions";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue