@@ -14,7 +14,6 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17−import "../Components"
18import "Gradient.js" as Gradient
17import "Gradient.js" as Gradient
19import QtQuick 2.4
18import QtQuick 2.4
20import Ubuntu.Components 1.3
19import Ubuntu.Components 1.3
@@ -25,6 +24,7 @@ Item {
25 property var model
24 property var model
27 property int animDuration: 10
26 property int animDuration: 10
27+ property bool useColor: true
29 QtObject {
29 QtObject {
@@ -36,6 +36,14 @@ Item {
36 || circleChangeAnimTimer.running
36 || circleChangeAnimTimer.running
39+ // Define a replacement white-based color theme when useColor is false
42+ property color main: "white"
43+ property color start: "white"
44+ property color end: "white"
39 Connections {
47 Connections {
40 target: model
48 target: model
41 ignoreUnknownSignals: model === undefined
49 ignoreUnknownSignals: model === undefined
@@ -142,9 +150,10 @@ Item {
142 width: dataCircle.width / divisor
150 width: dataCircle.width / divisor
143 height: dataCircle.height / divisor
151 height: dataCircle.height / divisor
144 opacity: 0.0
152 opacity: 0.0
145− scale: 0.0
153+ circleScale: 0.0
146 visible: modelData !== undefined
154 visible: modelData !== undefined
147 color: "transparent"
155 color: "transparent"
156+ centerCircle: dataCircle
149 SequentialAnimation {
158 SequentialAnimation {
150 id: pastCircleChangeAnim
159 id: pastCircleChangeAnim
@@ -160,7 +169,7 @@ Item {
161 PropertyAnimation {
170 PropertyAnimation {
162 target: pastCircle
171 target: pastCircle
163− property: "scale"
172+ property: "circleScale"
164 to: modelData
173 to: modelData
165 easing.type: Easing.OutCurve
174 easing.type: Easing.OutCurve
166 duration: circleChangeAnimTimer.interval * d.circleModifier
175 duration: circleChangeAnimTimer.interval * d.circleModifier
@@ -168,7 +177,10 @@ Item {
168 ColorAnimation {
177 ColorAnimation {
169 target: pastCircle
178 target: pastCircle
170 property: "color"
179 property: "color"
171− to: Gradient.threeColorByIndex(index, count, infographic.model.secondColor)
180+ to: Gradient.threeColorByIndex(index, count,
182+ infographic.model.secondColor :
172 easing.type: Easing.OutCurve
184 easing.type: Easing.OutCurve
173 duration: circleChangeAnimTimer.interval * d.circleModifier
185 duration: circleChangeAnimTimer.interval * d.circleModifier
@@ -202,9 +214,10 @@ Item {
202 width: dataCircle.width / divisor
214 width: dataCircle.width / divisor
203 height: dataCircle.height / divisor
215 height: dataCircle.height / divisor
204 opacity: 0.0
216 opacity: 0.0
205− scale: 0.0
217+ circleScale: 0.0
206 visible: modelData !== undefined
218 visible: modelData !== undefined
207 color: "transparent"
219 color: "transparent"
220+ centerCircle: dataCircle
209 SequentialAnimation {
222 SequentialAnimation {
210 id: presentCircleChangeAnim
223 id: presentCircleChangeAnim
@@ -221,7 +234,7 @@ Item {
222 PropertyAnimation {
235 PropertyAnimation {
223 target: presentCircle
236 target: presentCircle
224− property: "scale"
237+ property: "circleScale"
225 to: modelData
238 to: modelData
226 easing.type: Easing.OutCurve
239 easing.type: Easing.OutCurve
227 duration: circleChangeAnimTimer.interval * d.circleModifier
240 duration: circleChangeAnimTimer.interval * d.circleModifier
@@ -229,7 +242,10 @@ Item {
229 ColorAnimation {
242 ColorAnimation {
230 target: presentCircle
243 target: presentCircle
231 property: "color"
244 property: "color"
232− to: Gradient.threeColorByIndex(index, infographic.model.currentDay, infographic.model.firstColor)
245+ to: Gradient.threeColorByIndex(index, infographic.model.currentDay,
247+ infographic.model.firstColor :
233 easing.type: Easing.OutCurve
249 easing.type: Easing.OutCurve
234 duration: circleChangeAnimTimer.interval * d.circleModifier
250 duration: circleChangeAnimTimer.interval * d.circleModifier
@@ -239,15 +255,6 @@ Item {
243− id: backgroundCircle
244− objectName: "backgroundCircle"
246− anchors.fill: parent
248− source: "graphics/infographic_circle_back.png"
252 id: dotShowAnimTimer
259 id: dotShowAnimTimer
@@ -318,7 +325,7 @@ Item {
319 index: model.index
326 index: model.index
320 count: dots.count
327 count: dots.count
321− radius: backgroundCircle.width / 2
328+ radius: dataCircle.width / 2
322 halfSize: dot.width / 2
329 halfSize: dot.width / 2
323 posOffset: radius / dot.width / 3
330 posOffset: radius / dot.width / 3
324 state: dot.state
331 state: dot.state
@@ -327,7 +334,7 @@ Item {
328 objectName: "dot" + index
335 objectName: "dot" + index
330− property real baseOpacity: 0.4
337+ property real baseOpacity: 1
332 width: units.dp(5) * parent.radius / 200
339 width: units.dp(5) * parent.radius / 200
333 height: units.dp(5) * parent.radius / 200
340 height: units.dp(5) * parent.radius / 200
@@ -363,10 +370,10 @@ Item {
363 property alias hideAnim: decreaseOpacity
370 property alias hideAnim: decreaseOpacity
364 property alias showAnim: increaseOpacity
371 property alias showAnim: increaseOpacity
366− property real baseOpacity: 0.6
373+ property real baseOpacity: 1
367 property real duration: dotShowAnimTimer.interval * 5
374 property real duration: dotShowAnimTimer.interval * 5
369− height: 0.7 * backgroundCircle.width
376+ height: 0.7 * dataCircle.width
370 width: notification.height
377 width: notification.height
371 anchors.centerIn: parent
378 anchors.centerIn: parent