@@ -55,24 +55,72 @@ LocalComponents.Page {
5555 anchors.fill: content
5656 anchors.topMargin: customMargin
5757
58− Label {
59− id: hereCheckLabel
58+ Item {
59+ id: hereCheckGroup
6060 anchors {
6161 left: parent.left
62− right: hereTermsCheck.left
62+ right: parent.right
6363 top: parent.top
64− leftMargin: leftMargin
65− rightMargin: rightMargin/2
6664 }
67− lineHeight: 1.2
68− wrapMode: Text.WordWrap
69− color: textColor
70− font.weight: checked ? Font.Normal : Font.Light
71− text: i18n.tr("Use GPS, Wi-Fi hotspots and mobile network anonymously to detect location (recommended)")
72− property bool checked: true
65+ height: childrenRect.height
66+
67+ Label {
68+ id: hereCheckLabel
69+ anchors {
70+ left: parent.left
71+ right: hereTermsCheck.left
72+ top: parent.top
73+ leftMargin: leftMargin
74+ rightMargin: rightMargin/2
75+ }
76+ lineHeight: 1.2
77+ wrapMode: Text.WordWrap
78+ color: textColor
79+ font.weight: checked ? Font.Normal : Font.Light
80+ text: i18n.tr("Use GPS, Wi-Fi hotspots and mobile network anonymously to detect location (recommended)")
81+ property bool checked: true
82+ }
83+
84+ Label {
85+ id: hereTermsLabel
86+ anchors {
87+ left: parent.left
88+ right: hereTermsCheck.left
89+ top: hereCheckLabel.bottom
90+ topMargin: units.gu(1)
91+ leftMargin: leftMargin
92+ rightMargin: rightMargin/2
93+ }
94+
95+ wrapMode: Text.WordWrap
96+ color: textColor
97+ font.weight: Font.Light
98+ fontSize: "small"
99+ lineHeight: 1.2
100+ linkColor: UbuntuColors.orange
101+ text: i18n.tr("By selecting this option you agree to the Nokia HERE <a href='#'>terms and conditions</a>.")
102+ Mouse.forwardTo: hereCheckArea // clicking on the link also selects this group
103+ Mouse.priority: Mouse.AfterItem
104+ onLinkActivated: {
105+ pageStack.load(Qt.resolvedUrl("here-terms.qml"));
106+ }
107+ }
108+
109+ Image {
110+ id: hereTermsCheck
111+ fillMode: Image.PreserveAspectFit
112+ height: units.gu(1.5)
113+ source: "data/Tick@30.png"
114+ opacity: hereCheckLabel.checked ? 1 : 0
115+ anchors.right: parent.right
116+ anchors.verticalCenter: hereCheckLabel.verticalCenter
117+ anchors.rightMargin: rightMargin
118+ }
73119
74120 MouseArea {
121+ id: hereCheckArea
75122 anchors.fill: parent
123+ z: hereCheckGroup.z - 1 // so that the link can be activated
76124 onClicked: {
77125 if (!hereCheckLabel.checked) {
78126 hereCheckLabel.checked = true;
@@ -83,43 +131,11 @@ LocalComponents.Page {
83131 }
84132 }
85133
86− Label {
87− id: hereTermsLabel
88− anchors {
89− left: parent.left
90− right: hereTermsCheck.left
91− top: hereCheckLabel.bottom
92− topMargin: units.gu(1)
93− leftMargin: leftMargin
94− rightMargin: rightMargin/2
95− }
96−
97− wrapMode: Text.WordWrap
98− color: textColor
99− font.weight: Font.Light
100− fontSize: "small"
101− lineHeight: 1.2
102− linkColor: UbuntuColors.orange
103− text: i18n.tr("By selecting this option you agree to the Nokia HERE <a href='#'>terms and conditions</a>.")
104− onLinkActivated: pageStack.load(Qt.resolvedUrl("here-terms.qml"))
105− }
106−
107− Image {
108− id: hereTermsCheck
109− fillMode: Image.PreserveAspectFit
110− height: units.gu(1.5)
111− source: "data/Tick@30.png"
112− opacity: hereCheckLabel.checked ? 1 : 0
113− anchors.right: parent.right
114− anchors.verticalCenter: hereCheckLabel.verticalCenter
115− anchors.rightMargin: rightMargin
116− }
117−
118134 Rectangle {
119135 id: divider
120136 anchors.left: parent.left
121137 anchors.right: parent.right
122− anchors.top: hereTermsLabel.bottom
138+ anchors.top: hereCheckGroup.bottom
123139 anchors.topMargin: units.gu(3)
124140 height: units.dp(1)
125141 color: dividerColor