~pkunal-parmar/ubuntu-calendar-app/Minor-Performance

« back to all changes in this revision

Viewing changes to TimeLineBase.qml

  • Committer: Tarmac
  • Author(s): Kunal Parmar
  • Date: 2014-10-22 13:28:55 UTC
  • mfrom: (515.3.1 ubuntu-calendar-app)
  • Revision ID: tarmac-20141022132855-g285akh2d2ta1tab
Bug #1383832
"Now" line in doesn't move . Fixes: https://bugs.launchpad.net/bugs/1383832.

Approved by Ubuntu Phone Apps Jenkins Bot, Mihir Soni.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
            selectedDate.setHours(hour)
37
37
            pageStack.push(Qt.resolvedUrl("NewEvent.qml"), {"date":selectedDate, "model":eventModel});
38
38
        }
 
39
 
 
40
        onPressed: {
 
41
            intern.now = new Date();
 
42
            if( intern.now.isSameDay( bubbleOverLay.day ) ) {
 
43
                bubbleOverLay.showSeparator();
 
44
            }
 
45
        }
39
46
    }
40
47
 
41
48
    TimeSeparator {
103
110
        eventLayoutHelper.sendMessage(allSchs);
104
111
 
105
112
        if( intern.now.isSameDay( bubbleOverLay.day ) ) {
106
 
            bubbleOverLay.showSeparator(intern.now.getHours());
 
113
            bubbleOverLay.showSeparator();
107
114
        }
108
115
    }
109
116
 
174
181
        eventBubble.clicked.connect( bubbleOverLay.showEventDetails );
175
182
    }
176
183
 
177
 
    function showSeparator(hour) {
178
 
        var y = ((intern.now.getMinutes() * hourHeight) / 60) + hour * hourHeight;
 
184
    function showSeparator() {
 
185
        var y = ((intern.now.getMinutes() * hourHeight) / 60) + intern.now.getHours() * hourHeight;
179
186
        separator.y = y;
180
187
        separator.visible = true;
181
188
    }