~renatofilho/ubuntu-calendar-app/optimize

« back to all changes in this revision

Viewing changes to EventBubble.qml

  • Committer: Renato Araujo Oliveira Filho
  • Date: 2016-03-05 03:04:53 UTC
  • Revision ID: renato.filho@canonical.com-20160305030453-vtw8fx64sg1sdayb
Keep event bubble color in sync with calendar event color.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
 
28
28
    property var anchorDate;
29
29
    property var event;
30
 
    property var model;
 
30
    property var model: null
31
31
    property int depthInRow: 0
32
32
    property real sizeOfRow:0.0
33
33
    property real minuteHeight: 1.0
48
48
 
49
49
    signal clicked(var event);
50
50
 
 
51
    // keep color up-to-date
 
52
    Connections {
 
53
        target: model
 
54
        ignoreUnknownSignals: true
 
55
        onCollectionsChanged: assingnBgColor()
 
56
    }
 
57
 
51
58
    function assingnBgColor() {
52
59
        if (model && event ) {
53
60
            var collection = model.collection( event.collectionId );