on xenial help sign in
try harder not to get covered by OSK
33fa90dLukáš Tinkl
qml/Wizard/Page.qml+5−3
@@ -24,6 +24,7 @@ Item {
24 readonly property real buttonWidth: (width - buttonMargin * 2) / 2 -
24 readonly property real buttonWidth: (width - buttonMargin * 2) / 2 -
25 buttonMargin / 2
25 buttonMargin / 2
26 readonly property real buttonBarHeight: units.gu(5)
26 readonly property real buttonBarHeight: units.gu(5)
27+ readonly property real titleRectHeight: customTitle ? units.gu(10) : units.gu(16)
27
28
28 readonly property real topMargin: units.gu(11)
29 readonly property real topMargin: units.gu(11)
29 readonly property real bottomMargin: units.gu(3)
30 readonly property real bottomMargin: units.gu(3)
@@ -118,7 +119,7 @@ Item {
118 right: parent.right
119 right: parent.right
119 }
120 }
120 source: customTitle ? "" : "Pages/data/Phone header bkg.png"
121 source: customTitle ? "" : "Pages/data/Phone header bkg.png"
121− height: customTitle ? units.gu(10) : units.gu(16)
122+ height: titleRectHeight
122 clip: true
123 clip: true
123
124
124 // page title
125 // page title
@@ -211,9 +212,10 @@ Item {
211 // button bar
212 // button bar
212 Rectangle {
213 Rectangle {
213 id: buttonRect
214 id: buttonRect
214− visible: !lastPage && buttonBarVisible
215+ visible: buttonBarVisible
215 anchors {
216 anchors {
217+ bottom: parent.bottom
216− bottom: Qt.inputMethod.visible ? Qt.inputMethod.keyboardRectangle.top : parent.bottom
218+ bottomMargin: Qt.inputMethod.visible ? Qt.inputMethod.keyboardRectangle.height : 0
217 left: parent.left
219 left: parent.left
218 right: parent.right
220 right: parent.right
219 }
221 }
qml/Wizard/Pages/60-account.qml+24−39
@@ -19,7 +19,6 @@ import Ubuntu.Components 1.3
19import Ubuntu.Web 0.2
19import Ubuntu.Web 0.2
20import AccountsService 0.1
20import AccountsService 0.1
21import ".." as LocalComponents
21import ".." as LocalComponents
22−import "../../Components"
23
22
24LocalComponents.Page {
23LocalComponents.Page {
25 objectName: "accountPage"
24 objectName: "accountPage"
@@ -34,13 +33,12 @@ LocalComponents.Page {
34 QtObject {
33 QtObject {
35 id: d
34 id: d
36
35
37− readonly property bool validInput: /*emailInput.acceptableInput && */nameInput.text !== "" &&
36+ readonly property bool validInput: nameInput.text !== "" &&
38 pass2Input.text.length > 7 && passInput.text === pass2Input.text
37 pass2Input.text.length > 7 && passInput.text === pass2Input.text
39
38
40 function advance() {
39 function advance() {
41 root.password = passInput.text;
40 root.password = passInput.text;
42 AccountsService.realName = nameInput.text;
41 AccountsService.realName = nameInput.text;
43− //AccountsService.email = emailInput.text;
44 pageStack.next();
42 pageStack.next();
45 }
43 }
46 }
44 }
@@ -54,35 +52,8 @@ LocalComponents.Page {
54 anchors.leftMargin: parent.leftMargin
52 anchors.leftMargin: parent.leftMargin
55 anchors.rightMargin: parent.rightMargin
53 anchors.rightMargin: parent.rightMargin
56 anchors.topMargin: customMargin
54 anchors.topMargin: customMargin
57−
55+ height: contentHeight - buttonBarHeight - (Qt.inputMethod.visible ? Qt.inputMethod.keyboardRectangle.height : 0) - titleRectHeight
58− ListViewOSKScroller {
56+ contentHeight: contentItem.childrenRect.height
59− id: oskScroller
60− list: column
61− }
62−
63−// // email
64−// Label {
65−// id: emailLabel
66−// anchors.left: parent.left
67−// anchors.right: parent.right
68−// wrapMode: Text.Wrap
69−// text: i18n.tr("Email")
70−// color: textColor
71−// font.weight: Font.Light
72−// }
73−
74−// LocalComponents.WizardTextField {
75−// id: emailInput
76−// anchors.left: parent.left
77−// anchors.right: parent.right
78−// anchors.top: emailLabel.bottom
79−// anchors.topMargin: units.gu(1)
80−// inputMethodHints: Qt.ImhEmailCharactersOnly
81−// validator: RegExpValidator {
82−// regExp: /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i
83−// }
84−// KeyNavigation.tab: nameInput
85−// }
86
57
87 // notice
58 // notice
88 Label {
59 Label {
@@ -116,9 +87,13 @@ LocalComponents.Page {
116 anchors.right: parent.right
87 anchors.right: parent.right
117 anchors.top: nameLabel.bottom
88 anchors.top: nameLabel.bottom
118 anchors.topMargin: units.gu(1)
89 anchors.topMargin: units.gu(1)
119− KeyNavigation.tab: passInput
120− onActiveFocusChanged: if (activeFocus) oskScroller.setMakeSureVisibleItem(nameInput)
90+ onActiveFocusChanged: {
91+ if (activeFocus) {
92+ print("Name got focused", focus);
93+ column.contentY = nameLabel.y
94+ }
95+ }
121− inputMethodHints: Qt.ImhNoAutoUppercase
96+ inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhNoPredictiveText
122 onAccepted: passInput.forceActiveFocus()
97 onAccepted: passInput.forceActiveFocus()
123 }
98 }
124
99
@@ -142,8 +117,13 @@ LocalComponents.Page {
142 anchors.topMargin: units.gu(1)
117 anchors.topMargin: units.gu(1)
143 echoMode: TextInput.Password
118 echoMode: TextInput.Password
144 placeholderText: i18n.tr("Use a combination of letters and numbers")
119 placeholderText: i18n.tr("Use a combination of letters and numbers")
145− KeyNavigation.tab: pass2Input
120+ inputMethodHints: Qt.ImhNoPredictiveText
146− onActiveFocusChanged: if (activeFocus) oskScroller.setMakeSureVisibleItem(passInput)
121+ onActiveFocusChanged: {
122+ if (activeFocus) {
123+ print("Password got focused", focus);
124+ column.contentY = passLabel.y
125+ }
126+ }
147 onAccepted: pass2Input.forceActiveFocus()
127 onAccepted: pass2Input.forceActiveFocus()
148 }
128 }
149
129
@@ -177,8 +157,13 @@ LocalComponents.Page {
177 anchors.top: pass2Label.bottom
157 anchors.top: pass2Label.bottom
178 anchors.topMargin: units.gu(1)
158 anchors.topMargin: units.gu(1)
179 echoMode: TextInput.Password
159 echoMode: TextInput.Password
180− KeyNavigation.tab: nameInput
160+ inputMethodHints: Qt.ImhNoPredictiveText
181− onActiveFocusChanged: if (activeFocus) oskScroller.setMakeSureVisibleItem(pass2Input)
161+ onActiveFocusChanged: {
162+ if (activeFocus) {
163+ print("Password 2 got focused", focus);
164+ column.contentY = pass2Label.y
165+ }
166+ }
182 onAccepted: if (d.validInput) d.advance();
167 onAccepted: if (d.validInput) d.advance();
183 }
168 }
184 }
169 }
qml/Wizard/Pages/80-finished.qml+1
@@ -24,6 +24,7 @@ LocalComponents.Page {
24 hasBackButton: false
24 hasBackButton: false
25 customTitle: true
25 customTitle: true
26 lastPage: true
26 lastPage: true
27+ buttonBarVisible: false
27
28
28 Component.onCompleted: {
29 Component.onCompleted: {
29 state = "reanchored";
30 state = "reanchored";