on xenial help sign in
fix margins, edge-to-edge dividers
e36082fLukáš Tinkl
plugins/Unity/Indicators/indicatorsmodel.cpp+1−1
@@ -236,7 +236,7 @@ int IndicatorsModel::columnCount(const QModelIndex &) const
236 return 1;
236 return 1;
237}
237}
238
238
239−Q_INVOKABLE QVariant IndicatorsModel::data(int row, int role) const
239+QVariant IndicatorsModel::data(int row, int role) const
240{
240{
241 return data(index(row, 0), role);
241 return data(index(row, 0), role);
242}
242}
qml/Shell.qml+2−2
@@ -377,7 +377,7 @@ Item {
377 // more clever here.
377 // more clever here.
378 active: usageScenario != "desktop" && AccountsService.demoEdges
378 active: usageScenario != "desktop" && AccountsService.demoEdges
379
379
380− paused: LightDM.Greeter.active
380+ paused: lightDM.greeter.active
381 launcher: launcher
381 launcher: launcher
382 panel: panel
382 panel: panel
383 edgeSize: shell.edgeSize
383 edgeSize: shell.edgeSize
@@ -413,7 +413,7 @@ Item {
413 sourceComponent: shell.mode != "shell" ? integratedGreeter :
413 sourceComponent: shell.mode != "shell" ? integratedGreeter :
414 Qt.createComponent(Qt.resolvedUrl("Greeter/ShimGreeter.qml"));
414 Qt.createComponent(Qt.resolvedUrl("Greeter/ShimGreeter.qml"));
415 onLoaded: {
415 onLoaded: {
416− item.objectName = "greeter"
416+ item.objectName = "greeter"
417 }
417 }
418 }
418 }
419
419
qml/Wizard/Page.qml−2
@@ -135,8 +135,6 @@ Item {
135 left: parent.left
135 left: parent.left
136 right: parent.right
136 right: parent.right
137 bottom: buttonRect.top
137 bottom: buttonRect.top
138− leftMargin: leftMargin
139− rightMargin: rightMargin
140 }
138 }
141 }
139 }
142
140
qml/Wizard/Pages/10-language.qml+4−2
@@ -91,8 +91,8 @@ LocalComponents.Page {
91 snapMode: ListView.SnapToItem
91 snapMode: ListView.SnapToItem
92
92
93 anchors {
93 anchors {
94− left: parent.left;
94+ left: parent.left
95− right: parent.right;
95+ right: parent.right
96 }
96 }
97
97
98 height: column.height - column.spacing
98 height: column.height - column.spacing
@@ -111,6 +111,7 @@ LocalComponents.Page {
111 anchors {
111 anchors {
112 left: parent.left
112 left: parent.left
113 verticalCenter: parent.verticalCenter
113 verticalCenter: parent.verticalCenter
114+ leftMargin: leftMargin
114 }
115 }
115
116
116 fontSize: "medium"
117 fontSize: "medium"
@@ -122,6 +123,7 @@ LocalComponents.Page {
122 anchors {
123 anchors {
123 right: parent.right;
124 right: parent.right;
124 verticalCenter: parent.verticalCenter;
125 verticalCenter: parent.verticalCenter;
126+ rightMargin: rightMargin
125 }
127 }
126 fillMode: Image.PreserveAspectFit
128 fillMode: Image.PreserveAspectFit
127 height: langLabel.height / 2
129 height: langLabel.height / 2
qml/Wizard/Pages/20-sim.qml+5−1
@@ -89,7 +89,11 @@ LocalComponents.Page {
89 }
89 }
90
90
91 Column {
91 Column {
92+ anchors {
92− anchors.fill: content
93+ fill: content
94+ leftMargin: leftMargin
95+ rightMargin: rightMargin
96+ }
93 spacing: units.gu(4)
97 spacing: units.gu(4)
94
98
95 Label {
99 Label {
qml/Wizard/Pages/30-wifi.qml+6−2
@@ -142,8 +142,12 @@ LocalComponents.Page {
142 Column {
142 Column {
143 id: column
143 id: column
144 spacing: units.gu(2)
144 spacing: units.gu(2)
145+ anchors {
145− anchors.fill: content
146+ fill: content
147+ leftMargin: leftMargin
148+ rightMargin: rightMargin
146− anchors.topMargin: units.gu(4)
149+ topMargin: units.gu(4)
150+ }
147
151
148 Label {
152 Label {
149 id: label
153 id: label
qml/Wizard/Pages/40-location.qml+9
@@ -61,6 +61,7 @@ LocalComponents.Page {
61 left: parent.left
61 left: parent.left
62 right: parent.right
62 right: parent.right
63 top: parent.top
63 top: parent.top
64+ leftMargin: leftMargin
64 rightMargin: rightMargin
65 rightMargin: rightMargin
65 }
66 }
66
67
@@ -89,6 +90,7 @@ LocalComponents.Page {
89 right: parent.right
90 right: parent.right
90 top: hereCheckLabel.bottom
91 top: hereCheckLabel.bottom
91 topMargin: units.gu(1)
92 topMargin: units.gu(1)
93+ leftMargin: leftMargin
92 rightMargin: rightMargin
94 rightMargin: rightMargin
93 }
95 }
94
96
@@ -108,6 +110,7 @@ LocalComponents.Page {
108 opacity: hereCheckLabel.checked ? 1 : 0
110 opacity: hereCheckLabel.checked ? 1 : 0
109 anchors.right: parent.right
111 anchors.right: parent.right
110 anchors.verticalCenter: hereCheckLabel.verticalCenter
112 anchors.verticalCenter: hereCheckLabel.verticalCenter
113+ anchors.rightMargin: rightMargin
111 }
114 }
112
115
113 Rectangle {
116 Rectangle {
@@ -127,6 +130,7 @@ LocalComponents.Page {
127 right: parent.right
130 right: parent.right
128 top: divider.bottom
131 top: divider.bottom
129 topMargin: units.gu(3)
132 topMargin: units.gu(3)
133+ leftMargin: leftMargin
130 rightMargin: rightMargin
134 rightMargin: rightMargin
131 }
135 }
132 text: i18n.tr("GPS only")
136 text: i18n.tr("GPS only")
@@ -155,6 +159,7 @@ LocalComponents.Page {
155 opacity: gpsCheckLabel.checked ? 1 : 0
159 opacity: gpsCheckLabel.checked ? 1 : 0
156 anchors.right: parent.right
160 anchors.right: parent.right
157 anchors.verticalCenter: gpsCheckLabel.verticalCenter
161 anchors.verticalCenter: gpsCheckLabel.verticalCenter
162+ anchors.rightMargin: rightMargin
158 }
163 }
159
164
160 Rectangle {
165 Rectangle {
@@ -174,6 +179,7 @@ LocalComponents.Page {
174 right: parent.right
179 right: parent.right
175 top: divider2.bottom
180 top: divider2.bottom
176 topMargin: units.gu(3)
181 topMargin: units.gu(3)
182+ leftMargin: leftMargin
177 rightMargin: rightMargin
183 rightMargin: rightMargin
178 }
184 }
179 wrapMode: Text.WordWrap
185 wrapMode: Text.WordWrap
@@ -202,6 +208,7 @@ LocalComponents.Page {
202 opacity: nopeCheckLabel.checked ? 1 : 0
208 opacity: nopeCheckLabel.checked ? 1 : 0
203 anchors.right: parent.right
209 anchors.right: parent.right
204 anchors.verticalCenter: nopeCheckLabel.verticalCenter
210 anchors.verticalCenter: nopeCheckLabel.verticalCenter
211+ anchors.rightMargin: rightMargin
205 }
212 }
206
213
207 Rectangle {
214 Rectangle {
@@ -221,6 +228,8 @@ LocalComponents.Page {
221 right: parent.right
228 right: parent.right
222 top: divider3.bottom
229 top: divider3.bottom
223 topMargin: units.gu(3)
230 topMargin: units.gu(3)
231+ leftMargin: leftMargin
232+ rightMargin: rightMargin
224 }
233 }
225 wrapMode: Text.Wrap
234 wrapMode: Text.Wrap
226 textFormat: Text.RichText
235 textFormat: Text.RichText
qml/Wizard/Pages/50-timezone.qml+12−4
@@ -65,6 +65,8 @@ LocalComponents.Page {
65
65
66 Column {
66 Column {
67 anchors.verticalCenter: parent.verticalCenter
67 anchors.verticalCenter: parent.verticalCenter
68+ anchors.left: parent.left
69+ anchors.leftMargin: leftMargin
68 Label {
70 Label {
69 id: cityLabel
71 id: cityLabel
70 text: !!city ? city : ""
72 text: !!city ? city : ""
@@ -82,8 +84,9 @@ LocalComponents.Page {
82 }
84 }
83 Image {
85 Image {
84 anchors {
86 anchors {
85− right: parent.right;
87+ right: parent.right
86− verticalCenter: parent.verticalCenter;
88+ verticalCenter: parent.verticalCenter
89+ rightMargin: rightMargin
87 }
90 }
88 fillMode: Image.PreserveAspectFit
91 fillMode: Image.PreserveAspectFit
89 height: cityLabel.height / 2
92 height: cityLabel.height / 2
@@ -102,13 +105,18 @@ LocalComponents.Page {
102
105
103 Column {
106 Column {
104 id: column
107 id: column
108+ anchors {
105− anchors.fill: content
109+ fill: content
106− anchors.topMargin: units.gu(4)
110+ topMargin: units.gu(4)
111+ }
112+ spacing: units.gu(2)
107
113
108 TextField {
114 TextField {
109 id: searchField
115 id: searchField
110 anchors.left: parent.left
116 anchors.left: parent.left
111 anchors.right: parent.right
117 anchors.right: parent.right
118+ anchors.leftMargin: leftMargin
119+ anchors.rightMargin: rightMargin
112 placeholderText: i18n.tr("Enter your city or country")
120 placeholderText: i18n.tr("Enter your city or country")
113 color: UbuntuColors.lightGrey
121 color: UbuntuColors.lightGrey
114 inputMethodHints: Qt.ImhNoPredictiveText
122 inputMethodHints: Qt.ImhNoPredictiveText
qml/Wizard/Pages/uaccount-signup.qml → qml/Wizard/Pages/60-uaccount-signup.qmlrenamed+28−5
@@ -16,6 +16,7 @@
16
16
17import QtQuick 2.3
17import QtQuick 2.3
18import Ubuntu.Components 1.2
18import Ubuntu.Components 1.2
19+import Ubuntu.Web 0.2
19import ".." as LocalComponents
20import ".." as LocalComponents
20
21
21LocalComponents.Page {
22LocalComponents.Page {
@@ -23,9 +24,18 @@ LocalComponents.Page {
23
24
24 title: i18n.tr("Create Account")
25 title: i18n.tr("Create Account")
25 customTitle: true
26 customTitle: true
27+ customBack: true
26 backButtonText: i18n.tr("Cancel")
28 backButtonText: i18n.tr("Cancel")
27 forwardButtonSourceComponent: forwardButton
29 forwardButtonSourceComponent: forwardButton
28
30
31+ onBackClicked: {
32+ if (webview.visible) {
33+ webview.visible = false;
34+ } else {
35+ pageStack.prev();
36+ }
37+ }
38+
29 Item {
39 Item {
30 id: column
40 id: column
31 anchors.fill: content
41 anchors.fill: content
@@ -141,7 +151,7 @@ LocalComponents.Page {
141 anchors.top: pass2Input.bottom
151 anchors.top: pass2Input.bottom
142 anchors.topMargin: units.gu(3)
152 anchors.topMargin: units.gu(3)
143 text: i18n.tr("Encrypt my content")
153 text: i18n.tr("Encrypt my content")
144− KeyNavigation.tab: optoutCheck
154+ KeyNavigation.tab: termsCheck
145 }
155 }
146
156
147 LocalComponents.CheckableSetting {
157 LocalComponents.CheckableSetting {
@@ -163,21 +173,34 @@ LocalComponents.Page {
163 showDivider: false
173 showDivider: false
164 anchors.left: parent.left
174 anchors.left: parent.left
165 anchors.right: parent.right
175 anchors.right: parent.right
166− anchors.top: optoutCheck.bottom
176+ anchors.top: encryptCheck.bottom
167 anchors.topMargin: units.gu(1)
177 anchors.topMargin: units.gu(1)
168 text: i18n.tr("I have read and accept the Ubuntu account <a href='#'>terms of service</a>")
178 text: i18n.tr("I have read and accept the Ubuntu account <a href='#'>terms of service</a>")
169− //onLinkActivated: pageStack.load(Qt.resolvedUrl("here-terms.qml")) // TODO show terms
179+ onLinkActivated: {
180+ webview.visible = true;
181+ webview.url = "https://login.ubuntu.com/terms/";
182+ }
170 KeyNavigation.tab: emailInput
183 KeyNavigation.tab: emailInput
171− visible: false // TODO re-enable in Phase 2
184+ visible: true
172 }
185 }
173 }
186 }
174
187
188+ WebView {
189+ id: webview
190+ objectName: "webview"
191+ anchors.fill: content
192+ anchors.leftMargin: -leftMargin
193+ anchors.rightMargin: -rightMargin
194+ visible: false
195+ }
196+
175 Component {
197 Component {
176 id: forwardButton
198 id: forwardButton
177 LocalComponents.StackButton {
199 LocalComponents.StackButton {
178 enabled: emailInput.acceptableInput && nameInput.text !== "" &&
200 enabled: emailInput.acceptableInput && nameInput.text !== "" &&
179 //termsCheck.checked && // TODO re-enable in Phase 2
201 //termsCheck.checked && // TODO re-enable in Phase 2
180− pass2Input.text.length > 5 && passInput.text === pass2Input.text
202+ pass2Input.text.length > 7 && passInput.text === pass2Input.text &&
203+ termsCheck.checked
181 text: i18n.tr("Sign Up")
204 text: i18n.tr("Sign Up")
182 onClicked: pageStack.next() // TODO sign up against U1
205 onClicked: pageStack.next() // TODO sign up against U1
183 }
206 }
qml/Wizard/Pages/70-passwd-type.qml+4
@@ -69,6 +69,7 @@ LocalComponents.Page {
69 id: infoLabel
69 id: infoLabel
70 anchors.left: parent.left
70 anchors.left: parent.left
71 anchors.right: parent.right
71 anchors.right: parent.right
72+ anchors.leftMargin: leftMargin
72 wrapMode: Text.Wrap
73 wrapMode: Text.Wrap
73 text: i18n.tr("Choose lock screen security")
74 text: i18n.tr("Choose lock screen security")
74 color: textColor
75 color: textColor
@@ -108,6 +109,8 @@ LocalComponents.Page {
108 id: methodLabel
109 id: methodLabel
109 objectName: "passwdDelegate" + index
110 objectName: "passwdDelegate" + index
110 anchors.verticalCenter: parent.verticalCenter;
111 anchors.verticalCenter: parent.verticalCenter;
112+ anchors.left: parent.left
113+ anchors.leftMargin: leftMargin
111 fontSize: "medium"
114 fontSize: "medium"
112 color: textColor
115 color: textColor
113 font.weight: itemDelegate.isCurrent ? Font.Normal : Font.Light
116 font.weight: itemDelegate.isCurrent ? Font.Normal : Font.Light
@@ -132,6 +135,7 @@ LocalComponents.Page {
132 anchors {
135 anchors {
133 right: parent.right;
136 right: parent.right;
134 verticalCenter: parent.verticalCenter;
137 verticalCenter: parent.verticalCenter;
138+ rightMargin: rightMargin
135 }
139 }
136 fillMode: Image.PreserveAspectFit
140 fillMode: Image.PreserveAspectFit
137 height: methodLabel.height / 2
141 height: methodLabel.height / 2
qml/Wizard/Pages/here-terms.qml+6−6
@@ -28,9 +28,9 @@ LocalComponents.Page {
28
28
29 onBackClicked: {
29 onBackClicked: {
30 if (webview.visible) {
30 if (webview.visible) {
31− showBrowser(false)
31+ showBrowser(false);
32 } else {
32 } else {
33− pageStack.prev()
33+ pageStack.prev();
34 }
34 }
35 }
35 }
36
36
@@ -122,8 +122,8 @@ LocalComponents.Page {
122 text: i18n.tr("and Privacy Policy:") +
122 text: i18n.tr("and Privacy Policy:") +
123 " <a href=\"http://here.com/privacy/privacy-policy\">http://here.com/privacy/privacy-policy</a>"
123 " <a href=\"http://here.com/privacy/privacy-policy\">http://here.com/privacy/privacy-policy</a>"
124 onLinkActivated: {
124 onLinkActivated: {
125− showBrowser(true)
125+ showBrowser(true);
126− webview.url = link
126+ webview.url = link;
127 }
127 }
128 }
128 }
129
129
@@ -132,8 +132,8 @@ LocalComponents.Page {
132 objectName: "webview"
132 objectName: "webview"
133 anchors.left: parent.left
133 anchors.left: parent.left
134 anchors.right: parent.right
134 anchors.right: parent.right
135− anchors.leftMargin: 0
135+ anchors.leftMargin: -leftMargin
136− anchors.rightMargin: 0
136+ anchors.rightMargin: -rightMargin
137 height: parent.height
137 height: parent.height
138 visible: false
138 visible: false
139 }
139 }
qml/Wizard/Pages/passcode-confirm.qml−1
@@ -28,7 +28,6 @@ import "../../Components" as UnityComponents
28LocalComponents.Page {
28LocalComponents.Page {
29 id: passcodeConfirmPage
29 id: passcodeConfirmPage
30 objectName: "passcodeConfirmPage"
30 objectName: "passcodeConfirmPage"
31− forwardButtonSourceComponent: forwardButton
32 customTitle: true
31 customTitle: true
33 backButtonText: i18n.tr("Cancel")
32 backButtonText: i18n.tr("Cancel")
34
33
qml/Wizard/Pages/passcode-set.qml−1
@@ -28,7 +28,6 @@ import "../../Components" as UnityComponents
28LocalComponents.Page {
28LocalComponents.Page {
29 id: passcodeSetPage
29 id: passcodeSetPage
30 objectName: "passcodeSetPage"
30 objectName: "passcodeSetPage"
31− forwardButtonSourceComponent: forwardButton
32 customTitle: true
31 customTitle: true
33 backButtonText: i18n.tr("Cancel")
32 backButtonText: i18n.tr("Cancel")
34
33