~renatofilho/ubuntu-calendar-app/optimize

« back to all changes in this revision

Viewing changes to TimeLineBaseComponent.qml

  • Committer: Renato Araujo Oliveira Filho
  • Date: 2016-03-01 18:17:14 UTC
  • Revision ID: renato.filho@canonical.com-20160301181714-ek24bz7rx2doj8lq
Centralize event after creation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
84
84
        scrollHour = date.getHours();
85
85
 
86
86
        var currentTimeY = (scrollHour * hourItemHeight)
87
 
        var margin = (timeLineView.height / 2)
 
87
        var margin = (timeLineView.height / 2) * 0.8
88
88
 
89
89
        // Try to centralize the event time, if it is in the end of the view does not try it
90
90
        if (currentTimeY < (timeLineView.contentHeight - margin)) {