summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-09-21 18:48:05 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-09-22 10:26:27 +0200
commitd49fcec005b7c2c6a1a1453648d99fde66c494e2 (patch)
tree34a8b9bde9aab3f26a54dd9c996b2e05a978dae7
parent53c4fa0b3e356a346ea99a02b79a9d7cb7a7f403 (diff)
downloadkube-d49fcec005b7c2c6a1a1453648d99fde66c494e2.tar.gz
kube-d49fcec005b7c2c6a1a1453648d99fde66c494e2.zip
Autofocus password field
-rw-r--r--accounts/kolabnow/package/contents/ui/Login.qml6
-rw-r--r--components/kube/contents/ui/LoginView.qml4
-rw-r--r--framework/qml/LoginAccount.qml2
3 files changed, 5 insertions, 7 deletions
diff --git a/accounts/kolabnow/package/contents/ui/Login.qml b/accounts/kolabnow/package/contents/ui/Login.qml
index ae0213d5..e416b089 100644
--- a/accounts/kolabnow/package/contents/ui/Login.qml
+++ b/accounts/kolabnow/package/contents/ui/Login.qml
@@ -23,13 +23,12 @@ import org.kube.framework 1.0 as Kube
23import org.kube.accounts.kolabnow 1.0 as KolabnowAccount 23import org.kube.accounts.kolabnow 1.0 as KolabnowAccount
24 24
25Item { 25Item {
26 property string accountId 26 property alias accountId: settings.accountIdentifier
27 property string heading: qsTr("Login") 27 property string heading: qsTr("Login")
28 property string subheadline: settings.accountName 28 property string subheadline: settings.accountName
29 29
30 KolabnowAccount.KolabnowSettings { 30 KolabnowAccount.KolabnowSettings {
31 id: settings 31 id: settings
32 accountIdentifier: accountId
33 accountType: "kolabnow" 32 accountType: "kolabnow"
34 } 33 }
35 34
@@ -53,8 +52,9 @@ Item {
53 Kube.PasswordField { 52 Kube.PasswordField {
54 id: pwField 53 id: pwField
55 Layout.fillWidth: true 54 Layout.fillWidth: true
55 focus: true
56 56
57 placeholderText: qsTr("Password of your email account") 57 placeholderText: qsTr("Password of your Kolab Now account")
58 text: settings.imapPassword 58 text: settings.imapPassword
59 onTextChanged: settings.imapPassword = text 59 onTextChanged: settings.imapPassword = text
60 } 60 }
diff --git a/components/kube/contents/ui/LoginView.qml b/components/kube/contents/ui/LoginView.qml
index c5fdc396..840c74de 100644
--- a/components/kube/contents/ui/LoginView.qml
+++ b/components/kube/contents/ui/LoginView.qml
@@ -23,12 +23,10 @@ import QtQuick.Controls 1.3 as Controls
23import QtQuick.Controls 2.0 23import QtQuick.Controls 2.0
24import org.kube.framework 1.0 as Kube 24import org.kube.framework 1.0 as Kube
25 25
26Rectangle { 26FocusScope {
27 id: root 27 id: root
28 property alias accountId: login.accountId 28 property alias accountId: login.accountId
29 29
30 color: Kube.Colors.backgroundColor
31
32 Kube.LoginAccount { 30 Kube.LoginAccount {
33 id: login 31 id: login
34 anchors { 32 anchors {
diff --git a/framework/qml/LoginAccount.qml b/framework/qml/LoginAccount.qml
index 7eaa47f4..f02050ae 100644
--- a/framework/qml/LoginAccount.qml
+++ b/framework/qml/LoginAccount.qml
@@ -38,7 +38,6 @@ Item {
38 } 38 }
39 39
40 Item { 40 Item {
41
42 anchors { 41 anchors {
43 fill: parent 42 fill: parent
44 margins: Kube.Units.largeSpacing * 2 43 margins: Kube.Units.largeSpacing * 2
@@ -84,6 +83,7 @@ Item {
84 //The initial size is somehow necessary so the loader is properly anchored 83 //The initial size is somehow necessary so the loader is properly anchored
85 height: 10 84 height: 10
86 source: accountFactory.loginUi 85 source: accountFactory.loginUi
86 focus: true
87 onLoaded: item.accountId = root.accountId 87 onLoaded: item.accountId = root.accountId
88 } 88 }
89 Item { 89 Item {