@@ -15,6 +15,7 @@
17import QtQuick 2.3
17import QtQuick 2.3
18+import QtQuick.Controls 1.3
18import AccountsService 0.1
19import AccountsService 0.1
19import QMenuModel 0.1 as QMenuModel
20import QMenuModel 0.1 as QMenuModel
20import Qt.labs.folderlistmodel 2.1
21import Qt.labs.folderlistmodel 2.1
@@ -50,81 +51,152 @@ LocalComponents.Page {
50 Component.onCompleted: start()
51 Component.onCompleted: start()
53− Column {
54+ Component.onCompleted: {
55+ group.bindCheckable(hereCheckLabel)
56+ group.bindCheckable(gpsCheckLabel)
57+ group.bindCheckable(nopeCheckLabel)
54 id: column
65 id: column
55 anchors.fill: content
66 anchors.fill: content
57 anchors.topMargin: units.gu(4)
67 anchors.topMargin: units.gu(4)
60− anchors.left: parent.left
70+ id: hereCheckLabel
61− anchors.right: parent.right
71+ anchors {
62− height: childrenRect.height
72+ left: parent.left
63− spacing: units.gu(2)
73+ right: parent.right
65− LocalComponents.CheckableSetting {
75+ rightMargin: rightMargin
67− objectName: "hereCheck"
77+
68− showDivider: false
78+ wrapMode: Text.WordWrap
80+ font.weight: checked ? Font.Normal : Font.Light
69− text: i18n.tr("Use GPS, Wi-Fi hotspots and mobile network anonymously to detect location (recommended)")
81+ text: i18n.tr("Use GPS, Wi-Fi hotspots and mobile network anonymously to detect location (recommended)")
70− checked: true
82+ property bool checked: true
72− gpsCheck.checked = false;
84+ MouseArea {
73− hereCheck.checked = true;
85+ anchors.fill: parent
74− nopeCheck.checked = false;
86+ onClicked: {
87+ hereCheckLabel.checked = !hereCheckLabel.checked
79− id: termsLabel
93+ id: hereTermsLabel
80− objectName: "hereTermsLink"
94+ anchors {
81− anchors.left: parent.left
95+ left: parent.left
82− anchors.leftMargin: hereCheck.labelOffset
83− anchors.right: parent.right
96+ right: parent.right
84− wrapMode: Text.Wrap
97+ top: hereCheckLabel.bottom
85− linkColor: "#dd4814"
98+ topMargin: units.gu(1)
86− color: "black"
99+ rightMargin: rightMargin
88− font.weight: Font.Light
89− // TRANSLATORS: HERE is a trademark for Nokia's location service, you probably shouldn't translate it
90− text: i18n.tr("By selecting this option you agree to the Nokia HERE <a href='#'>terms and conditions</a>.")
91− onLinkActivated: pageStack.load(Qt.resolvedUrl("here-terms.qml"))
102+ wrapMode: Text.WordWrap
104+ font.weight: Font.Light
106+ linkColor: "#dd4814"
107+ text: i18n.tr("By selecting this option you agree to the Nokia HERE <a href='#'>terms and conditions</a>.")
108+ onLinkActivated: pageStack.load(Qt.resolvedUrl("here-terms.qml"))
112+ fillMode: Image.PreserveAspectFit
113+ height: hereCheckLabel.height
114+ source: "data/Tick.png"
115+ opacity: hereCheckLabel.checked ? 1 : 0
116+ anchors.right: parent.right
95− LocalComponents.CheckableSetting {
119+ Label {
96− id: gpsCheck
120+ id: gpsCheckLabel
97− objectName: "gpsCheck"
121+ anchors {
98− showDivider: false
122+ left: parent.left
124+ top: hereTermsLabel.bottom
125+ topMargin: units.gu(3)
126+ rightMargin: rightMargin
99 text: i18n.tr("GPS only")
128 text: i18n.tr("GPS only")
100− onTriggered: {
129+ wrapMode: Text.WordWrap
101− gpsCheck.checked = true;
130+ color: "black"
102− hereCheck.checked = false;
131+ font.weight: checked ? Font.Normal : Font.Light
103− nopeCheck.checked = false;
132+ width: content.width
133+ property bool checked: false
136+ anchors.fill: parent
138+ gpsCheckLabel.checked = !gpsCheckLabel.checked
107− LocalComponents.CheckableSetting {
143+ Image {
108− id: nopeCheck
144+ fillMode: Image.PreserveAspectFit
109− objectName: "nopeCheck"
145+ height: gpsCheckLabel.height
110− showDivider: false
146+ source: "data/Tick.png"
147+ opacity: gpsCheckLabel.checked ? 1 : 0
148+ anchors.right: parent.right
149+ anchors.verticalCenter: gpsCheckLabel.verticalCenter
157+ top: gpsCheckLabel.bottom
158+ topMargin: units.gu(3)
159+ rightMargin: rightMargin
161+ wrapMode: Text.WordWrap
163+ font.weight: checked ? Font.Normal : Font.Light
164+ width: content.width
111 text: i18n.tr("Don't use my location")
165 text: i18n.tr("Don't use my location")
112− onTriggered: {
166+ property bool checked: false
113− gpsCheck.checked = false;
167+
114− hereCheck.checked = false;
168+ MouseArea {
115− nopeCheck.checked = true;
169+ anchors.fill: parent
171+ nopeCheckLabel.checked = !nopeCheckLabel.checked
120− anchors.left: parent.left
177+ fillMode: Image.PreserveAspectFit
178+ height: nopeCheckLabel.height
179+ source: "data/Tick.png"
180+ opacity: nopeCheckLabel.checked ? 1 : 0
121 anchors.right: parent.right
181 anchors.right: parent.right
182+ anchors.verticalCenter: nopeCheckLabel.verticalCenter
190+ top: nopeCheckLabel.bottom
191+ topMargin: units.gu(3)
122 wrapMode: Text.Wrap
193 wrapMode: Text.Wrap
123 textFormat: Text.RichText
194 textFormat: Text.RichText
124 text: i18n.tr("You can change it later in <em>System Settings</em>.")
195 text: i18n.tr("You can change it later in <em>System Settings</em>.")
125 color: "black"
196 color: "black"
126 fontSize: "small"
197 fontSize: "small"
127 font.weight: Font.Light
198 font.weight: Font.Light
199+ width: content.width
@@ -133,9 +205,9 @@ LocalComponents.Page {
133 LocalComponents.StackButton {
205 LocalComponents.StackButton {
134 text: i18n.tr("Next")
206 text: i18n.tr("Next")
135 onClicked: {
207 onClicked: {
136− var locationOn = gpsCheck.checked || hereCheck.checked;
208+ var locationOn = gpsCheckLabel.checked || hereCheckLabel.checked;
137− var gpsOn = gpsCheck.checked || hereCheck.checked;
209+ var gpsOn = gpsCheckLabel.checked || hereCheckLabel.checked;
138− var hereOn = hereCheck.checked;
210+ var hereOn = hereCheckLabel.checked;
140 // location service doesn't currently listen to updateState
212 // location service doesn't currently listen to updateState
141 // requests, so we activate the actions if needed.
213 // requests, so we activate the actions if needed.