From d49fcec005b7c2c6a1a1453648d99fde66c494e2 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 21 Sep 2017 18:48:05 +0200 Subject: Autofocus password field --- accounts/kolabnow/package/contents/ui/Login.qml | 6 +++--- components/kube/contents/ui/LoginView.qml | 4 +--- framework/qml/LoginAccount.qml | 2 +- 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 import org.kube.accounts.kolabnow 1.0 as KolabnowAccount Item { - property string accountId + property alias accountId: settings.accountIdentifier property string heading: qsTr("Login") property string subheadline: settings.accountName KolabnowAccount.KolabnowSettings { id: settings - accountIdentifier: accountId accountType: "kolabnow" } @@ -53,8 +52,9 @@ Item { Kube.PasswordField { id: pwField Layout.fillWidth: true + focus: true - placeholderText: qsTr("Password of your email account") + placeholderText: qsTr("Password of your Kolab Now account") text: settings.imapPassword onTextChanged: settings.imapPassword = text } 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 import QtQuick.Controls 2.0 import org.kube.framework 1.0 as Kube -Rectangle { +FocusScope { id: root property alias accountId: login.accountId - color: Kube.Colors.backgroundColor - Kube.LoginAccount { id: login 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 { } Item { - anchors { fill: parent margins: Kube.Units.largeSpacing * 2 @@ -84,6 +83,7 @@ Item { //The initial size is somehow necessary so the loader is properly anchored height: 10 source: accountFactory.loginUi + focus: true onLoaded: item.accountId = root.accountId } Item { -- cgit v1.2.3