summaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-09-24 16:37:51 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-09-24 16:37:51 +0200
commitbe29e22144307802956bf201c5790c1ed9d7baaa (patch)
treed4c8dfd85bd19e53ff36369d5c73b15ec98ed24c /components
parent9e1f5ffade77222f5fa05d9ad1c2d098259af280 (diff)
downloadkube-be29e22144307802956bf201c5790c1ed9d7baaa.tar.gz
kube-be29e22144307802956bf201c5790c1ed9d7baaa.zip
Focus handling in accountsview
Diffstat (limited to 'components')
-rw-r--r--components/accounts/contents/ui/AccountWizard.qml6
-rw-r--r--components/kube/contents/ui/AccountsView.qml9
2 files changed, 12 insertions, 3 deletions
diff --git a/components/accounts/contents/ui/AccountWizard.qml b/components/accounts/contents/ui/AccountWizard.qml
index 394c3d32..187741b9 100644
--- a/components/accounts/contents/ui/AccountWizard.qml
+++ b/components/accounts/contents/ui/AccountWizard.qml
@@ -28,7 +28,6 @@ Kube.Popup {
28 property var availableAccountPlugins: [] 28 property var availableAccountPlugins: []
29 29
30 modal: true 30 modal: true
31 focus: true
32 closePolicy: requireSetup ? Controls2.Popup.NoAutoClose : Controls2.Popup.CloseOnEscape | Controls2.Popup.CloseOnPressOutside 31 closePolicy: requireSetup ? Controls2.Popup.NoAutoClose : Controls2.Popup.CloseOnEscape | Controls2.Popup.CloseOnPressOutside
33 32
34 clip: true 33 clip: true
@@ -55,6 +54,11 @@ Kube.Popup {
55 id: mainView 54 id: mainView
56 55
57 FocusScope { 56 FocusScope {
57 onActiveFocusChanged: {
58 if (activeFocus) {
59 layout.children[0].forceActiveFocus(Qt.TabFocusReason)
60 }
61 }
58 Kube.Heading { 62 Kube.Heading {
59 id: heading 63 id: heading
60 text: qsTr("Select your new account type") 64 text: qsTr("Select your new account type")
diff --git a/components/kube/contents/ui/AccountsView.qml b/components/kube/contents/ui/AccountsView.qml
index 0547ccac..df88e1f7 100644
--- a/components/kube/contents/ui/AccountsView.qml
+++ b/components/kube/contents/ui/AccountsView.qml
@@ -23,9 +23,8 @@ import QtQuick.Controls 2.0
23import org.kube.framework 1.0 as Kube 23import org.kube.framework 1.0 as Kube
24import org.kube.components.accounts 1.0 as KubeAccounts 24import org.kube.components.accounts 1.0 as KubeAccounts
25 25
26Rectangle { 26FocusScope {
27 id: root 27 id: root
28 color: Kube.Colors.backgroundColor
29 //Defines whether more than one account is supported. 28 //Defines whether more than one account is supported.
30 property bool singleAccountMode: false 29 property bool singleAccountMode: false
31 //Defines available account types. 30 //Defines available account types.
@@ -121,6 +120,12 @@ Rectangle {
121 } 120 }
122 } 121 }
123 122
123 onActiveFocusChanged: {
124 if (activeFocus && accountWizard.visible) {
125 accountWizard.forceActiveFocus()
126 }
127 }
128
124 //BEGIN AccountWizard 129 //BEGIN AccountWizard
125 KubeAccounts.AccountWizard { 130 KubeAccounts.AccountWizard {
126 id: accountWizard 131 id: accountWizard