Skip to content

Commit

Permalink
remove useless key navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
CyAn84 committed Oct 17, 2024
1 parent 8062aad commit 040b8f8
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 31 deletions.
2 changes: 0 additions & 2 deletions client/ui/qml/Controls2/HeaderType.qml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ Item {

property string descriptionText

focus: true

implicitWidth: content.implicitWidth
implicitHeight: content.implicitHeight

Expand Down
1 change: 0 additions & 1 deletion client/ui/qml/Pages2/PageProtocolShadowSocksSettings.qml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ PageType {
enabled: isPortEditable | isCipherEditable

text: qsTr("Save")
Keys.onTabPressed: lastItemTabClicked(focusItem)

clickedFunc: function() {
forceActiveFocus()
Expand Down
2 changes: 0 additions & 2 deletions client/ui/qml/Pages2/PageProtocolXraySettings.qml
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,6 @@ PageType {

text: qsTr("Save")

Keys.onTabPressed: lastItemTabClicked(focusItem)

onClicked: {
forceActiveFocus()

Expand Down
1 change: 0 additions & 1 deletion client/ui/qml/Pages2/PageSettingsAppSplitTunneling.qml
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ PageType {
textFieldPlaceholderText: qsTr("application name")
buttonImageSource: "qrc:/images/controls/plus.svg"

Keys.onTabPressed: lastItemTabClicked(focusItem)
rightButtonClickedOnEnter: true

clickedFunc: function() {
Expand Down
7 changes: 0 additions & 7 deletions client/ui/qml/Pages2/PageSettingsApplication.qml
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ PageType {
rightImageSource: "qrc:/images/controls/chevron-right.svg"
textColor: AmneziaStyle.color.vibrantRed

Keys.onTabPressed: lastItemTabClicked()
parentFlickable: fl

clickedFunction: function() {
Expand Down Expand Up @@ -246,11 +245,5 @@ PageType {

width: root.width
height: root.height

// onClosed: {
// if (!GC.isMobile()) {
// focusItem.forceActiveFocus()
// }
// }
}
}
17 changes: 2 additions & 15 deletions client/ui/qml/Pages2/PageSetupWizardProtocolSettings.qml
Original file line number Diff line number Diff line change
Expand Up @@ -104,23 +104,10 @@ PageType {
DrawerType2 {
id: showDetailsDrawer
parent: root
onClosed: {
if (!GC.isMobile()) {
// defaultActiveFocusItem.forceActiveFocus()
}
}

anchors.fill: parent
expandedHeight: parent.height * 0.9
expandedStateContent: Item {
Connections {
target: showDetailsDrawer
enabled: !GC.isMobile()
function onOpened() {
focusItem2.forceActiveFocus()
}
}

implicitHeight: showDetailsDrawer.expandedHeight

// Item {
Expand Down Expand Up @@ -196,7 +183,7 @@ PageType {
parentFlickable: fl

text: qsTr("Close")
Keys.onTabPressed: lastItemTabClicked(focusItem2)
// Keys.onTabPressed: lastItemTabClicked(focusItem2)

clickedFunc: function() {
showDetailsDrawer.close()
Expand Down Expand Up @@ -248,7 +235,7 @@ PageType {

text: qsTr("Install")

Keys.onTabPressed: lastItemTabClicked(focusItem)
// Keys.onTabPressed: lastItemTabClicked(focusItem)

clickedFunc: function() {
if (!port.textField.acceptableInput &&
Expand Down
1 change: 0 additions & 1 deletion client/ui/qml/Pages2/PageSetupWizardTextKey.qml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ PageType {
anchors.bottomMargin: 32

text: qsTr("Continue")
Keys.onTabPressed: lastItemTabClicked(focusItem)

clickedFunc: function() {
if (ImportController.extractConfigFromData(textKey.textFieldText)) {
Expand Down
2 changes: 0 additions & 2 deletions client/ui/qml/Pages2/PageSetupWizardViewConfig.qml
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,6 @@ PageType {
anchors.rightMargin: 16
anchors.leftMargin: 16

Keys.onTabPressed: lastItemTabClicked(focusItem)

BasicButtonType {
id: connectButton
Layout.fillWidth: true
Expand Down

0 comments on commit 040b8f8

Please sign in to comment.