~mterry/unity8/split

« back to all changes in this revision

Viewing changes to Greeter/Infographics.qml

  • Committer: Michael Terry
  • Date: 2013-10-15 17:48:24 UTC
  • mfrom: (138.2.326 trunk)
  • Revision ID: michael.terry@canonical.com-20131015174824-x1n7rx100b0ph8v4
MergeĀ fromĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
    Connections {
30
30
        target: model
31
31
 
 
32
        onDataAboutToAppear: startHideAnimation() // hide "no data" label
32
33
        onDataAppeared: startShowAnimation()
33
34
 
34
35
        onDataAboutToChange: startHideAnimation()
35
 
 
36
36
        onDataChanged: startShowAnimation()
37
37
 
38
38
        onDataAboutToDisappear: startHideAnimation()
 
39
        onDataDisappeared: startShowAnimation() // show "no data" label
39
40
    }
40
41
 
41
42
    function startShowAnimation() {
 
43
        dotHideAnimTimer.stop()
 
44
        circleShrinkAnimTimer.stop()
 
45
        notification.hideAnim.stop()
 
46
 
42
47
        dotShowAnimTimer.startFromBeginning()
43
48
        notification.showAnim.start()
44
49
    }
45
50
 
46
51
    function startHideAnimation() {
 
52
        dotShowAnimTimer.stop()
 
53
        circleGrowAnimTimer.stop()
 
54
        notification.showAnim.stop()
 
55
 
47
56
        dotHideAnimTimer.startFromBeginning()
48
57
        notification.hideAnim.start()
49
58
    }
396
405
            }
397
406
        }
398
407
 
399
 
        Text {
 
408
        Label {
400
409
            id: notification
401
410
            objectName: "label"
402
411
 
410
419
            anchors.centerIn: parent
411
420
 
412
421
            text: infographic.model.label
413
 
            font.pixelSize: notification.height / 12
414
422
 
415
423
            wrapMode: Text.WordWrap
416
424
            horizontalAlignment: Text.AlignHCenter
417
425
            verticalAlignment: Text.AlignVCenter
418
426
            color: "white"
419
 
            font.weight: Font.Light
420
427
 
421
428
            PropertyAnimation {
422
429
                id: increaseOpacity