~acerisara/ubuntu-calendar-app/bottom-edge-autopilot

« back to all changes in this revision

Viewing changes to TimeLineBaseComponent.qml

  • Committer: Tarmac
  • Author(s): Kunal Parmar
  • Date: 2014-11-27 15:59:10 UTC
  • mfrom: (550.2.3 ubuntu-calendar-app)
  • Revision ID: tarmac-20141127155910-cjr8v74u5flziv3x
Timeline background chnges required for new day and week view support.

Approved by Mihir Soni, Ubuntu Phone Apps Jenkins Bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
        var currentTime = new Date();
44
44
        scrollHour = currentTime.getHours();
45
45
 
46
 
        timeLineView.contentY = scrollHour * units.gu(10);
 
46
        timeLineView.contentY = scrollHour * units.gu(8);
47
47
        if(timeLineView.contentY >= timeLineView.contentHeight - timeLineView.height) {
48
48
            timeLineView.contentY = timeLineView.contentHeight - timeLineView.height
49
49
        }
61
61
 
62
62
        onScrollDown:{
63
63
            scrollHour++;
64
 
            var visibleHour = root.height / units.gu(10);
 
64
            var visibleHour = root.height / units.gu(8);
65
65
            if( scrollHour > (25 -visibleHour)) {
66
66
                scrollHour = 25 - visibleHour;
67
67
            }
70
70
    }
71
71
 
72
72
    function scrollToHour() {
73
 
        timeLineView.contentY = scrollHour * units.gu(10);
 
73
        timeLineView.contentY = scrollHour * units.gu(8);
74
74
        if(timeLineView.contentY >= timeLineView.contentHeight - timeLineView.height) {
75
75
            timeLineView.contentY = timeLineView.contentHeight - timeLineView.height
76
76
        }
108
108
    Flickable {
109
109
        id: timeLineView
110
110
 
111
 
        contentHeight: units.gu(10) * 24
 
111
        contentHeight: units.gu(8) * 24
112
112
        contentWidth: width
113
113
        anchors.fill: parent
114
114
 
115
115
        clip: true
116
116
 
117
 
        TimeLineBackground {}
 
117
        Row {
 
118
            width: parent.width
 
119
            height: timeLineView.contentHeight
 
120
            TimeLineTimeScale{ id: timeScale }
 
121
            TimeLineBackground { width: parent.width - x}
 
122
        }
118
123
 
119
124
        Row {
120
125
            id: week