Merge lp:~renatofilho/indicators-client/fix-1130264 into lp:indicators-client

Proposed by Renato Araujo Oliveira Filho
Status: Merged
Approved by: Gustavo Pichorim Boiko
Approved revision: 194
Merged at revision: 194
Proposed branch: lp:~renatofilho/indicators-client/fix-1130264
Merge into: lp:indicators-client
Diff against target: 208 lines (+110/-48)
4 files modified
chewieui/Ubuntu/ChewieUI/CMakeLists.txt (+1/-0)
chewieui/Ubuntu/ChewieUI/TextMenu.qml (+80/-0)
chewieui/Ubuntu/ChewieUI/qmldir (+1/-0)
plugins/networkplugin/qml/PasswordDialog.qml (+28/-48)
To merge this branch: bzr merge lp:~renatofilho/indicators-client/fix-1130264
Reviewer Review Type Date Requested Status
Gustavo Pichorim Boiko (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+152047@code.launchpad.net

Commit message

[Network] Changed password dialog layout to avoid problems with swipe gestures.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Gustavo Pichorim Boiko (boiko) wrote :

Looks good and works as expected.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'chewieui/Ubuntu/ChewieUI/CMakeLists.txt'
2--- chewieui/Ubuntu/ChewieUI/CMakeLists.txt 2013-01-18 12:13:08 +0000
3+++ chewieui/Ubuntu/ChewieUI/CMakeLists.txt 2013-03-06 20:10:26 +0000
4@@ -33,6 +33,7 @@
5 SectionMenu.qml
6 SliderMenu.qml
7 SwitchMenu.qml
8+ TextMenu.qml
9 ProgressMenu.qml
10 qmldir
11 )
12
13=== added file 'chewieui/Ubuntu/ChewieUI/TextMenu.qml'
14--- chewieui/Ubuntu/ChewieUI/TextMenu.qml 1970-01-01 00:00:00 +0000
15+++ chewieui/Ubuntu/ChewieUI/TextMenu.qml 2013-03-06 20:10:26 +0000
16@@ -0,0 +1,80 @@
17+/*
18+ * Copyright 2013 Canonical Ltd.
19+ *
20+ * This program is free software; you can redistribute it and/or modify
21+ * it under the terms of the GNU Lesser General Public License as published by
22+ * the Free Software Foundation; version 3.
23+ *
24+ * This program is distributed in the hope that it will be useful,
25+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
26+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27+ * GNU Lesser General Public License for more details.
28+ *
29+ * You should have received a copy of the GNU Lesser General Public License
30+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
31+ *
32+ * Authors:
33+ * Renato Araujo Oliveira Filho <renato@canonical.com>
34+ */
35+
36+import QtQuick 2.0
37+import Ubuntu.Components 0.1
38+
39+Menu {
40+ id: _textMenu
41+
42+ property alias text: _textField.text
43+ property alias password: _showPassword.visible
44+
45+ implicitHeight: password ? units.gu(10) : units.gu(7)
46+
47+ Column {
48+ spacing: units.gu(0.5)
49+ anchors {
50+ left: parent.left
51+ right: parent.right
52+ verticalCenter: parent.verticalCenter
53+ margins: units.gu(3)
54+ }
55+
56+ TextField {
57+ id: _textField
58+
59+ anchors {
60+ left: parent.left
61+ right: parent.right
62+ }
63+
64+ placeholderText: "Password"
65+ echoMode: _textMenu.password && !_checkBox.checked ? TextInput.Password : TextInput.Normal
66+ }
67+
68+ Row {
69+ id: _showPassword
70+
71+ visible: false
72+ anchors {
73+ left: parent.left
74+ right: parent.right
75+
76+ }
77+
78+ spacing: units.gu(1)
79+
80+ CheckBox {
81+ id: _checkBox
82+ }
83+
84+ Label {
85+ text: "Show password"
86+ anchors.verticalCenter: _checkBox.verticalCenter
87+ }
88+ }
89+ }
90+
91+ DBusActionState {
92+ action: menu ? menu.action : undefined
93+ target: _textField
94+ property: "text"
95+ }
96+}
97
98=== modified file 'chewieui/Ubuntu/ChewieUI/qmldir'
99--- chewieui/Ubuntu/ChewieUI/qmldir 2013-01-09 17:11:42 +0000
100+++ chewieui/Ubuntu/ChewieUI/qmldir 2013-03-06 20:10:26 +0000
101@@ -13,4 +13,5 @@
102 SectionMenu 0.1 SectionMenu.qml
103 SliderMenu 0.1 SliderMenu.qml
104 SwitchMenu 0.1 SwitchMenu.qml
105+TextMenu 0.1 TextMenu.qml
106 ProgressMenu 0.1 ProgressMenu.qml
107
108=== modified file 'plugins/networkplugin/qml/PasswordDialog.qml'
109--- plugins/networkplugin/qml/PasswordDialog.qml 2013-01-11 15:05:30 +0000
110+++ plugins/networkplugin/qml/PasswordDialog.qml 2013-03-06 20:10:26 +0000
111@@ -20,6 +20,7 @@
112 import QtQuick 2.0
113 import Ubuntu.Components 0.1
114 import Ubuntu.Components.ListItems 0.1 as ListItem
115+import Ubuntu.ChewieUI 0.1 as ChewieUI
116
117 Page {
118 id: pagePassword
119@@ -31,53 +32,31 @@
120 title: "Network Authentication"
121
122 Column {
123- width: parent.width
124-
125- ListItem.Standard {
126- height: units.gu(7)
127- width: parent.width
128- Label {
129- anchors.fill: parent
130- anchors.margins: units.gu(0.5)
131- fontSize: "large"
132- text: "Authentication"
133- }
134- }
135-
136- ListItem.Standard {
137- height: units.gu(7)
138- width: parent.width
139- TextField {
140- id: txtPassword
141- anchors.fill: parent
142- anchors.margins: units.gu(0.5)
143- placeholderText: "Password"
144- echoMode: showPasswordCheckBox.checked ? TextInput.Normal : TextInput.Password
145- }
146- }
147-
148- ListItem.Standard {
149- height: units.gu(7)
150- Row {
151- anchors.top: parent.top
152- anchors.left: parent.left
153- anchors.bottom: parent.bottom
154- anchors.margins: units.gu(0.5)
155- spacing: units.gu(0.5)
156- CheckBox {
157- id: showPasswordCheckBox
158- }
159- Label {
160- text: "Show password"
161- anchors.verticalCenter: showPasswordCheckBox.verticalCenter
162- }
163- }
164- Row {
165- anchors.top: parent.top
166- anchors.right: parent.right
167- anchors.bottom: parent.bottom
168- anchors.margins: units.gu(0.5)
169- spacing: units.gu(0.5)
170+ anchors {
171+ left: parent.left
172+ right: parent.right
173+ }
174+
175+ ChewieUI.SectionMenu {
176+ label: "Authentication"
177+ }
178+
179+ ChewieUI.TextMenu {
180+ id: _password
181+
182+ password: true
183+ }
184+
185+ ChewieUI.Menu {
186+ Row {
187+ anchors {
188+ right: parent.right
189+ verticalCenter: parent.verticalCenter
190+ margins: units.gu(3)
191+ }
192+
193+ spacing: units.gu(1)
194+
195 Button {
196 text: "Cancel"
197 width: units.gu(10)
198@@ -89,8 +68,9 @@
199
200 Button {
201 text: "Ok"
202+ width: units.gu(10)
203 onClicked: {
204- agent.authenticate(token, txtPassword.text)
205+ agent.authenticate(token, _password.text)
206 pageStack.pop()
207 }
208 }

Subscribers

People subscribed via source and target branches