@@ -15,6 +15,7 @@
17import QtQuick 2.4
17import QtQuick 2.4
18+import QtQuick.Layouts 1.1
18import Ubuntu.Components 1.3
19import Ubuntu.Components 1.3
19import ".." as LocalComponents
20import ".." as LocalComponents
@@ -31,13 +32,15 @@ LocalComponents.Page {
32 property alias password: passwordField.text
33 property alias password: passwordField.text
34− Column {
35+ GridLayout {
35 id: column
36 id: column
36 anchors.fill: content
39 anchors.fill: content
37 anchors.leftMargin: leftMargin
40 anchors.leftMargin: leftMargin
38 anchors.rightMargin: rightMargin
41 anchors.rightMargin: rightMargin
39 anchors.topMargin: customMargin
42 anchors.topMargin: customMargin
40− spacing: units.gu(3)
43+ rowSpacing: units.gu(3)
43 id: infoLabel
46 id: infoLabel
@@ -52,22 +55,24 @@ LocalComponents.Page {
52 text: i18n.tr("Enter 4 numbers to setup your passcode")
55 text: i18n.tr("Enter 4 numbers to setup your passcode")
55− Grid {
58+ GridLayout {
56 columns: 2
59 columns: 2
57− spacing: units.gu(2)
60+ columnSpacing: units.gu(2)
58− verticalItemAlignment: Grid.AlignVCenter
61+ rowSpacing: units.gu(2)
61 text: i18n.tr("Choose passcode")
64 text: i18n.tr("Choose passcode")
62 color: textColor
65 color: textColor
64 LocalComponents.WizardTextField {
67 LocalComponents.WizardTextField {
68+ Layout.fillWidth: true
65 id: passwordField
69 id: passwordField
66 objectName: "passwordField"
70 objectName: "passwordField"
67 echoMode: TextInput.Password
71 echoMode: TextInput.Password
68 inputMethodHints: Qt.ImhDigitsOnly
72 inputMethodHints: Qt.ImhDigitsOnly
69 validator: RegExpValidator { regExp: /^\d{4}$/ }
73 validator: RegExpValidator { regExp: /^\d{4}$/ }
70 maximumLength: 4
74 maximumLength: 4
75+ onAccepted: password2Field.forceActiveFocus()
@@ -75,6 +80,7 @@ LocalComponents.Page {
75 color: textColor
80 color: textColor
77 LocalComponents.WizardTextField {
82 LocalComponents.WizardTextField {
83+ Layout.fillWidth: true
78 id: password2Field
84 id: password2Field
79 objectName: "password2Field"
85 objectName: "password2Field"
80 echoMode: TextInput.Password
86 echoMode: TextInput.Password
@@ -83,6 +89,10 @@ LocalComponents.Page {
83 maximumLength: 4
89 maximumLength: 4
94+ Layout.fillHeight: true
88 Component {
98 Component {