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

« back to all changes in this revision

Viewing changes to MonthView.qml

  • Committer: Kunal Parmar
  • Date: 2014-10-23 14:14:10 UTC
  • mfrom: (524.1.2 trunk)
  • Revision ID: pkunal.parmar@gmail.com-20141023141410-dxelmd8zlt9ned70
removed unnecessary files

Show diffs side-by-side

added added

removed removed

Lines of Context:
89
89
            return  new Date(date.getFullYear(), date.getMonth() + month, 1, 0, 0, 0);
90
90
        }
91
91
 
92
 
        delegate: MonthComponent {
93
 
            property bool isCurrentItem: index === monthViewPath.currentIndex
94
 
 
95
 
            showEvents: true
96
 
 
 
92
        delegate: Loader {
97
93
            width: parent.width - units.gu(4)
98
94
            height: parent.height
99
95
 
100
 
            currentMonth: monthViewPath.addMonth(monthViewPath.startMonth,
101
 
                                                 monthViewPath.indexType(index));
102
 
 
103
 
            isYearView: false
104
 
 
105
 
            onDateSelected: {
106
 
                monthViewPage.dateSelected(date);
 
96
            sourceComponent: delegateComponent
 
97
            asynchronous: index !== monthViewPath.currentIndex
 
98
 
 
99
            Component {
 
100
                id: delegateComponent
 
101
 
 
102
                MonthComponent {
 
103
                    isCurrentItem: index === monthViewPath.currentIndex
 
104
 
 
105
                    showEvents: true
 
106
 
 
107
                    anchors.fill: parent
 
108
 
 
109
                    currentMonth: monthViewPath.addMonth(monthViewPath.startMonth,
 
110
                                                         monthViewPath.indexType(index));
 
111
 
 
112
                    isYearView: false
 
113
 
 
114
                    onDateSelected: {
 
115
                        monthViewPage.dateSelected(date);
 
116
                    }
 
117
                }
107
118
            }
108
119
        }
109
120
    }