diff options
author | Michael Bohlender <michael.bohlender@kdemail.net> | 2017-07-27 15:14:05 +0200 |
---|---|---|
committer | Michael Bohlender <michael.bohlender@kdemail.net> | 2017-07-27 15:14:05 +0200 |
commit | 44ce57aec2b5af8a5d2f59747cb0bb859e68d08e (patch) | |
tree | 95729bc61fedb61abd5ce11e50b019b19894d496 | |
parent | 4c38cb8d10c2925387fdedf816fe7493652ee69a (diff) | |
download | kube-44ce57aec2b5af8a5d2f59747cb0bb859e68d08e.tar.gz kube-44ce57aec2b5af8a5d2f59747cb0bb859e68d08e.zip |
use Kube.CheckBox and improve layout
-rw-r--r-- | accounts/kolabnow/package/contents/ui/KolabnowAccountSettings.qml | 39 |
1 files changed, 18 insertions, 21 deletions
diff --git a/accounts/kolabnow/package/contents/ui/KolabnowAccountSettings.qml b/accounts/kolabnow/package/contents/ui/KolabnowAccountSettings.qml index 4dcc23ee..c691c44a 100644 --- a/accounts/kolabnow/package/contents/ui/KolabnowAccountSettings.qml +++ b/accounts/kolabnow/package/contents/ui/KolabnowAccountSettings.qml | |||
@@ -18,7 +18,6 @@ | |||
18 | */ | 18 | */ |
19 | 19 | ||
20 | import QtQuick 2.4 | 20 | import QtQuick 2.4 |
21 | import QtQuick.Controls 1.4 as Controls | ||
22 | import QtQuick.Layouts 1.1 | 21 | import QtQuick.Layouts 1.1 |
23 | import org.kube.framework 1.0 as Kube | 22 | import org.kube.framework 1.0 as Kube |
24 | import org.kube.accounts.kolabnow 1.0 as KolabnowAccount | 23 | import org.kube.accounts.kolabnow 1.0 as KolabnowAccount |
@@ -100,32 +99,30 @@ Item { | |||
100 | text: qsTr("Password") | 99 | text: qsTr("Password") |
101 | Layout.alignment: Qt.AlignRight | 100 | Layout.alignment: Qt.AlignRight |
102 | } | 101 | } |
103 | RowLayout { | 102 | |
103 | Kube.TextField { | ||
104 | id: pwField | ||
104 | Layout.fillWidth: true | 105 | Layout.fillWidth: true |
105 | 106 | ||
106 | Kube.TextField { | 107 | placeholderText: qsTr("Password of your email account") |
107 | id: pwField | 108 | text: kolabnowSettings.imapPassword |
108 | Layout.fillWidth: true | 109 | onTextChanged: { |
110 | kolabnowSettings.imapPassword = text | ||
111 | kolabnowSettings.smtpPassword = text | ||
112 | } | ||
109 | 113 | ||
110 | placeholderText: qsTr("Password of your email account") | 114 | echoMode: pwCheck.checked ? TextInput.Normal : TextInput.Password |
111 | text: kolabnowSettings.imapPassword | 115 | } |
112 | onTextChanged: { | ||
113 | kolabnowSettings.imapPassword = text | ||
114 | kolabnowSettings.smtpPassword = text | ||
115 | } | ||
116 | 116 | ||
117 | echoMode: TextInput.Password | 117 | Kube.Label { |
118 | text: "" | ||
119 | } | ||
120 | RowLayout { | ||
121 | Kube.CheckBox { | ||
122 | id: pwCheck | ||
118 | } | 123 | } |
119 | 124 | Kube.Label { | |
120 | Controls.CheckBox { | ||
121 | text: qsTr("Show Password") | 125 | text: qsTr("Show Password") |
122 | onClicked: { | ||
123 | if(pwField.echoMode == TextInput.Password) { | ||
124 | pwField.echoMode = TextInput.Normal; | ||
125 | } else { | ||
126 | pwField.echoMode = TextInput.Password; | ||
127 | } | ||
128 | } | ||
129 | } | 126 | } |
130 | } | 127 | } |
131 | } | 128 | } |