Added tab navigation functional. (#721)
- Added tab navigation functional. - In basic types added parentFlickable property, which will help to ensure, that the item is visible within flickable parent during tab navigation. - Added focus state for some basic types. - In PageType qml file added lastItemTabClicked function, which will help to focus tab bar buttons when the last tab on the current page clicked. - Added Focus for back button for all pages and drawers. - Added scroll on tab for Servers ListView on PageHome.
This commit is contained in:
parent
d50e7dd3f4
commit
0e4ae26bae
66 changed files with 2269 additions and 143 deletions
|
|
@ -15,6 +15,8 @@ PageType {
|
|||
|
||||
property bool isControlsDisabled: false
|
||||
|
||||
defaultActiveFocusItem: focusItem
|
||||
|
||||
Connections {
|
||||
target: PageController
|
||||
|
||||
|
|
@ -136,7 +138,13 @@ PageType {
|
|||
qsTr(" Helps you access blocked content without revealing your privacy, even to VPN providers.")
|
||||
}
|
||||
|
||||
Item {
|
||||
id: focusItem
|
||||
KeyNavigation.tab: startButton
|
||||
}
|
||||
|
||||
BasicButtonType {
|
||||
id: startButton
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 32
|
||||
Layout.leftMargin: 16
|
||||
|
|
@ -147,9 +155,12 @@ PageType {
|
|||
clickedFunc: function() {
|
||||
connectionTypeSelection.open()
|
||||
}
|
||||
|
||||
KeyNavigation.tab: startButton2
|
||||
}
|
||||
|
||||
BasicButtonType {
|
||||
id: startButton2
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 8
|
||||
Layout.leftMargin: 16
|
||||
|
|
@ -167,11 +178,18 @@ PageType {
|
|||
clickedFunc: function() {
|
||||
Qt.openUrlExternally(qsTr("https://amnezia.org/instructions/0_starter-guide"))
|
||||
}
|
||||
|
||||
Keys.onTabPressed: lastItemTabClicked(focusItem)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ConnectionTypeSelectionDrawer {
|
||||
id: connectionTypeSelection
|
||||
|
||||
onClosed: {
|
||||
PageController.forceTabBarActiveFocus()
|
||||
root.defaultActiveFocusItem.forceActiveFocus()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue