@@ -14,7 +14,6 @@
1414 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1515 */
1616
17−import "../Components"
1817import "Gradient.js" as Gradient
1918import QtQuick 2.4
2019import Ubuntu.Components 1.3
@@ -25,6 +24,7 @@ Item {
2524 property var model
2625
2726 property int animDuration: 10
27+ property bool useColor: true
2828
2929 QtObject {
3030 id: d
@@ -36,6 +36,14 @@ Item {
3636 || circleChangeAnimTimer.running
3737 }
3838
39+ // Define a replacement white-based color theme when useColor is false
40+ QtObject {
41+ id: whiteTheme
42+ property color main: "white"
43+ property color start: "white"
44+ property color end: "white"
45+ }
46+
3947 Connections {
4048 target: model
4149 ignoreUnknownSignals: model === undefined
@@ -142,9 +150,10 @@ Item {
142150 width: dataCircle.width / divisor
143151 height: dataCircle.height / divisor
144152 opacity: 0.0
145− scale: 0.0
153+ circleScale: 0.0
146154 visible: modelData !== undefined
147155 color: "transparent"
156+ centerCircle: dataCircle
148157
149158 SequentialAnimation {
150159 id: pastCircleChangeAnim
@@ -160,7 +169,7 @@ Item {
160169 }
161170 PropertyAnimation {
162171 target: pastCircle
163− property: "scale"
172+ property: "circleScale"
164173 to: modelData
165174 easing.type: Easing.OutCurve
166175 duration: circleChangeAnimTimer.interval * d.circleModifier
@@ -168,7 +177,10 @@ Item {
168177 ColorAnimation {
169178 target: pastCircle
170179 property: "color"
171− to: Gradient.threeColorByIndex(index, count, infographic.model.secondColor)
180+ to: Gradient.threeColorByIndex(index, count,
181+ useColor ?
182+ infographic.model.secondColor :
183+ whiteTheme)
172184 easing.type: Easing.OutCurve
173185 duration: circleChangeAnimTimer.interval * d.circleModifier
174186 }
@@ -202,9 +214,10 @@ Item {
202214 width: dataCircle.width / divisor
203215 height: dataCircle.height / divisor
204216 opacity: 0.0
205− scale: 0.0
217+ circleScale: 0.0
206218 visible: modelData !== undefined
207219 color: "transparent"
220+ centerCircle: dataCircle
208221
209222 SequentialAnimation {
210223 id: presentCircleChangeAnim
@@ -221,7 +234,7 @@ Item {
221234 }
222235 PropertyAnimation {
223236 target: presentCircle
224− property: "scale"
237+ property: "circleScale"
225238 to: modelData
226239 easing.type: Easing.OutCurve
227240 duration: circleChangeAnimTimer.interval * d.circleModifier
@@ -229,7 +242,10 @@ Item {
229242 ColorAnimation {
230243 target: presentCircle
231244 property: "color"
232− to: Gradient.threeColorByIndex(index, infographic.model.currentDay, infographic.model.firstColor)
245+ to: Gradient.threeColorByIndex(index, infographic.model.currentDay,
246+ useColor ?
247+ infographic.model.firstColor :
248+ whiteTheme)
233249 easing.type: Easing.OutCurve
234250 duration: circleChangeAnimTimer.interval * d.circleModifier
235251 }
@@ -239,15 +255,6 @@ Item {
239255 }
240256 }
241257
242− Image {
243− id: backgroundCircle
244− objectName: "backgroundCircle"
245−
246− anchors.fill: parent
247−
248− source: "graphics/infographic_circle_back.png"
249− }
250−
251258 Timer {
252259 id: dotShowAnimTimer
253260
@@ -318,7 +325,7 @@ Item {
318325
319326 index: model.index
320327 count: dots.count
321− radius: backgroundCircle.width / 2
328+ radius: dataCircle.width / 2
322329 halfSize: dot.width / 2
323330 posOffset: radius / dot.width / 3
324331 state: dot.state
@@ -327,7 +334,7 @@ Item {
327334 id: dot
328335 objectName: "dot" + index
329336
330− property real baseOpacity: 0.4
337+ property real baseOpacity: 1
331338
332339 width: units.dp(5) * parent.radius / 200
333340 height: units.dp(5) * parent.radius / 200
@@ -363,10 +370,10 @@ Item {
363370 property alias hideAnim: decreaseOpacity
364371 property alias showAnim: increaseOpacity
365372
366− property real baseOpacity: 0.6
373+ property real baseOpacity: 1
367374 property real duration: dotShowAnimTimer.interval * 5
368375
369− height: 0.7 * backgroundCircle.width
376+ height: 0.7 * dataCircle.width
370377 width: notification.height
371378 anchors.centerIn: parent
372379