on xenial help sign in
fix margins, edge-to-edge dividers
commite36082fad59882c9ab94d215d21d21b8a18a871a authorLukáš Tinkl <lukas.tinkl@canonical.com> dateMon 7 Sep 2015, 18:10 (11 years ago) parentaa48623
13 files changed+77−27
plugins/Unity/Indicators/indicatorsmodel.cpp+1−1 qml/Shell.qml+2−2 qml/Wizard/Page.qml−2 qml/Wizard/Pages/10-language.qml+4−2 qml/Wizard/Pages/20-sim.qml+5−1 qml/Wizard/Pages/30-wifi.qml+6−2 qml/Wizard/Pages/40-location.qml+9 qml/Wizard/Pages/50-timezone.qml+12−4 qml/Wizard/Pages/uaccount-signup.qml → qml/Wizard/Pages/60-uaccount-signup.qml+28−5 qml/Wizard/Pages/70-passwd-type.qml+4 qml/Wizard/Pages/here-terms.qml+6−6 qml/Wizard/Pages/passcode-confirm.qml−1 qml/Wizard/Pages/passcode-set.qml−1
plugins/Unity/Indicators/indicatorsmodel.cpp+1−1
@@ -236,7 +236,7 @@ int IndicatorsModel::columnCount(const QModelIndex &) const
236236 return 1;
237237}
238238
239−Q_INVOKABLE QVariant IndicatorsModel::data(int row, int role) const
239+QVariant IndicatorsModel::data(int row, int role) const
240240{
241241 return data(index(row, 0), role);
242242}
qml/Shell.qml+2−2
@@ -377,7 +377,7 @@ Item {
377377 // more clever here.
378378 active: usageScenario != "desktop" && AccountsService.demoEdges
379379
380− paused: LightDM.Greeter.active
380+ paused: lightDM.greeter.active
381381 launcher: launcher
382382 panel: panel
383383 edgeSize: shell.edgeSize
@@ -413,7 +413,7 @@ Item {
413413 sourceComponent: shell.mode != "shell" ? integratedGreeter :
414414 Qt.createComponent(Qt.resolvedUrl("Greeter/ShimGreeter.qml"));
415415 onLoaded: {
416− item.objectName = "greeter"
416+ item.objectName = "greeter"
417417 }
418418 }
419419
qml/Wizard/Page.qml−2
@@ -135,8 +135,6 @@ Item {
135135 left: parent.left
136136 right: parent.right
137137 bottom: buttonRect.top
138− leftMargin: leftMargin
139− rightMargin: rightMargin
140138 }
141139 }
142140
qml/Wizard/Pages/10-language.qml+4−2
@@ -91,8 +91,8 @@ LocalComponents.Page {
9191 snapMode: ListView.SnapToItem
9292
9393 anchors {
94− left: parent.left;
95− right: parent.right;
94+ left: parent.left
95+ right: parent.right
9696 }
9797
9898 height: column.height - column.spacing
@@ -111,6 +111,7 @@ LocalComponents.Page {
111111 anchors {
112112 left: parent.left
113113 verticalCenter: parent.verticalCenter
114+ leftMargin: leftMargin
114115 }
115116
116117 fontSize: "medium"
@@ -122,6 +123,7 @@ LocalComponents.Page {
122123 anchors {
123124 right: parent.right;
124125 verticalCenter: parent.verticalCenter;
126+ rightMargin: rightMargin
125127 }
126128 fillMode: Image.PreserveAspectFit
127129 height: langLabel.height / 2
qml/Wizard/Pages/20-sim.qml+5−1
@@ -89,7 +89,11 @@ LocalComponents.Page {
8989 }
9090
9191 Column {
92− anchors.fill: content
92+ anchors {
93+ fill: content
94+ leftMargin: leftMargin
95+ rightMargin: rightMargin
96+ }
9397 spacing: units.gu(4)
9498
9599 Label {
qml/Wizard/Pages/30-wifi.qml+6−2
@@ -142,8 +142,12 @@ LocalComponents.Page {
142142 Column {
143143 id: column
144144 spacing: units.gu(2)
145− anchors.fill: content
146− anchors.topMargin: units.gu(4)
145+ anchors {
146+ fill: content
147+ leftMargin: leftMargin
148+ rightMargin: rightMargin
149+ topMargin: units.gu(4)
150+ }
147151
148152 Label {
149153 id: label
qml/Wizard/Pages/40-location.qml+9
@@ -61,6 +61,7 @@ LocalComponents.Page {
6161 left: parent.left
6262 right: parent.right
6363 top: parent.top
64+ leftMargin: leftMargin
6465 rightMargin: rightMargin
6566 }
6667
@@ -89,6 +90,7 @@ LocalComponents.Page {
8990 right: parent.right
9091 top: hereCheckLabel.bottom
9192 topMargin: units.gu(1)
93+ leftMargin: leftMargin
9294 rightMargin: rightMargin
9395 }
9496
@@ -108,6 +110,7 @@ LocalComponents.Page {
108110 opacity: hereCheckLabel.checked ? 1 : 0
109111 anchors.right: parent.right
110112 anchors.verticalCenter: hereCheckLabel.verticalCenter
113+ anchors.rightMargin: rightMargin
111114 }
112115
113116 Rectangle {
@@ -127,6 +130,7 @@ LocalComponents.Page {
127130 right: parent.right
128131 top: divider.bottom
129132 topMargin: units.gu(3)
133+ leftMargin: leftMargin
130134 rightMargin: rightMargin
131135 }
132136 text: i18n.tr("GPS only")
@@ -155,6 +159,7 @@ LocalComponents.Page {
155159 opacity: gpsCheckLabel.checked ? 1 : 0
156160 anchors.right: parent.right
157161 anchors.verticalCenter: gpsCheckLabel.verticalCenter
162+ anchors.rightMargin: rightMargin
158163 }
159164
160165 Rectangle {
@@ -174,6 +179,7 @@ LocalComponents.Page {
174179 right: parent.right
175180 top: divider2.bottom
176181 topMargin: units.gu(3)
182+ leftMargin: leftMargin
177183 rightMargin: rightMargin
178184 }
179185 wrapMode: Text.WordWrap
@@ -202,6 +208,7 @@ LocalComponents.Page {
202208 opacity: nopeCheckLabel.checked ? 1 : 0
203209 anchors.right: parent.right
204210 anchors.verticalCenter: nopeCheckLabel.verticalCenter
211+ anchors.rightMargin: rightMargin
205212 }
206213
207214 Rectangle {
@@ -221,6 +228,8 @@ LocalComponents.Page {
221228 right: parent.right
222229 top: divider3.bottom
223230 topMargin: units.gu(3)
231+ leftMargin: leftMargin
232+ rightMargin: rightMargin
224233 }
225234 wrapMode: Text.Wrap
226235 textFormat: Text.RichText
qml/Wizard/Pages/50-timezone.qml+12−4
@@ -65,6 +65,8 @@ LocalComponents.Page {
6565
6666 Column {
6767 anchors.verticalCenter: parent.verticalCenter
68+ anchors.left: parent.left
69+ anchors.leftMargin: leftMargin
6870 Label {
6971 id: cityLabel
7072 text: !!city ? city : ""
@@ -82,8 +84,9 @@ LocalComponents.Page {
8284 }
8385 Image {
8486 anchors {
85− right: parent.right;
86− verticalCenter: parent.verticalCenter;
87+ right: parent.right
88+ verticalCenter: parent.verticalCenter
89+ rightMargin: rightMargin
8790 }
8891 fillMode: Image.PreserveAspectFit
8992 height: cityLabel.height / 2
@@ -102,13 +105,18 @@ LocalComponents.Page {
102105
103106 Column {
104107 id: column
105− anchors.fill: content
106− anchors.topMargin: units.gu(4)
108+ anchors {
109+ fill: content
110+ topMargin: units.gu(4)
111+ }
112+ spacing: units.gu(2)
107113
108114 TextField {
109115 id: searchField
110116 anchors.left: parent.left
111117 anchors.right: parent.right
118+ anchors.leftMargin: leftMargin
119+ anchors.rightMargin: rightMargin
112120 placeholderText: i18n.tr("Enter your city or country")
113121 color: UbuntuColors.lightGrey
114122 inputMethodHints: Qt.ImhNoPredictiveText
qml/Wizard/Pages/uaccount-signup.qml → qml/Wizard/Pages/60-uaccount-signup.qmlrenamed+28−5
@@ -16,6 +16,7 @@
1616
1717import QtQuick 2.3
1818import Ubuntu.Components 1.2
19+import Ubuntu.Web 0.2
1920import ".." as LocalComponents
2021
2122LocalComponents.Page {
@@ -23,9 +24,18 @@ LocalComponents.Page {
2324
2425 title: i18n.tr("Create Account")
2526 customTitle: true
27+ customBack: true
2628 backButtonText: i18n.tr("Cancel")
2729 forwardButtonSourceComponent: forwardButton
2830
31+ onBackClicked: {
32+ if (webview.visible) {
33+ webview.visible = false;
34+ } else {
35+ pageStack.prev();
36+ }
37+ }
38+
2939 Item {
3040 id: column
3141 anchors.fill: content
@@ -141,7 +151,7 @@ LocalComponents.Page {
141151 anchors.top: pass2Input.bottom
142152 anchors.topMargin: units.gu(3)
143153 text: i18n.tr("Encrypt my content")
144− KeyNavigation.tab: optoutCheck
154+ KeyNavigation.tab: termsCheck
145155 }
146156
147157 LocalComponents.CheckableSetting {
@@ -163,21 +173,34 @@ LocalComponents.Page {
163173 showDivider: false
164174 anchors.left: parent.left
165175 anchors.right: parent.right
166− anchors.top: optoutCheck.bottom
176+ anchors.top: encryptCheck.bottom
167177 anchors.topMargin: units.gu(1)
168178 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+ }
170183 KeyNavigation.tab: emailInput
171− visible: false // TODO re-enable in Phase 2
184+ visible: true
172185 }
173186 }
174187
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+
175197 Component {
176198 id: forwardButton
177199 LocalComponents.StackButton {
178200 enabled: emailInput.acceptableInput && nameInput.text !== "" &&
179201 //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
181204 text: i18n.tr("Sign Up")
182205 onClicked: pageStack.next() // TODO sign up against U1
183206 }
qml/Wizard/Pages/70-passwd-type.qml+4
@@ -69,6 +69,7 @@ LocalComponents.Page {
6969 id: infoLabel
7070 anchors.left: parent.left
7171 anchors.right: parent.right
72+ anchors.leftMargin: leftMargin
7273 wrapMode: Text.Wrap
7374 text: i18n.tr("Choose lock screen security")
7475 color: textColor
@@ -108,6 +109,8 @@ LocalComponents.Page {
108109 id: methodLabel
109110 objectName: "passwdDelegate" + index
110111 anchors.verticalCenter: parent.verticalCenter;
112+ anchors.left: parent.left
113+ anchors.leftMargin: leftMargin
111114 fontSize: "medium"
112115 color: textColor
113116 font.weight: itemDelegate.isCurrent ? Font.Normal : Font.Light
@@ -132,6 +135,7 @@ LocalComponents.Page {
132135 anchors {
133136 right: parent.right;
134137 verticalCenter: parent.verticalCenter;
138+ rightMargin: rightMargin
135139 }
136140 fillMode: Image.PreserveAspectFit
137141 height: methodLabel.height / 2
qml/Wizard/Pages/here-terms.qml+6−6
@@ -28,9 +28,9 @@ LocalComponents.Page {
2828
2929 onBackClicked: {
3030 if (webview.visible) {
31− showBrowser(false)
31+ showBrowser(false);
3232 } else {
33− pageStack.prev()
33+ pageStack.prev();
3434 }
3535 }
3636
@@ -122,8 +122,8 @@ LocalComponents.Page {
122122 text: i18n.tr("and Privacy Policy:") +
123123 " <a href=\"http://here.com/privacy/privacy-policy\">http://here.com/privacy/privacy-policy</a>"
124124 onLinkActivated: {
125− showBrowser(true)
126− webview.url = link
125+ showBrowser(true);
126+ webview.url = link;
127127 }
128128 }
129129
@@ -132,8 +132,8 @@ LocalComponents.Page {
132132 objectName: "webview"
133133 anchors.left: parent.left
134134 anchors.right: parent.right
135− anchors.leftMargin: 0
136− anchors.rightMargin: 0
135+ anchors.leftMargin: -leftMargin
136+ anchors.rightMargin: -rightMargin
137137 height: parent.height
138138 visible: false
139139 }
qml/Wizard/Pages/passcode-confirm.qml−1
@@ -28,7 +28,6 @@ import "../../Components" as UnityComponents
2828LocalComponents.Page {
2929 id: passcodeConfirmPage
3030 objectName: "passcodeConfirmPage"
31− forwardButtonSourceComponent: forwardButton
3231 customTitle: true
3332 backButtonText: i18n.tr("Cancel")
3433
qml/Wizard/Pages/passcode-set.qml−1
@@ -28,7 +28,6 @@ import "../../Components" as UnityComponents
2828LocalComponents.Page {
2929 id: passcodeSetPage
3030 objectName: "passcodeSetPage"
31− forwardButtonSourceComponent: forwardButton
3231 customTitle: true
3332 backButtonText: i18n.tr("Cancel")
3433