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

« back to all changes in this revision

Viewing changes to MonthView.qml

  • Committer: Tarmac
  • Author(s): Mihir Soni
  • Date: 2014-10-22 18:27:38 UTC
  • mfrom: (519.1.3 limitLablesModel)
  • Revision ID: tarmac-20141022182738-g8jxgtygmunt7y6g
Moved limitLabels from object to ListModel.

Approved by Kunal Parmar, Ubuntu Phone Apps Jenkins Bot, Arto Jalkanen.

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: Loader {
 
92
        delegate: MonthComponent {
 
93
            property bool isCurrentItem: index === monthViewPath.currentIndex
 
94
 
 
95
            showEvents: true
 
96
 
93
97
            width: parent.width - units.gu(4)
94
98
            height: parent.height
95
99
 
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
 
                }
 
100
            currentMonth: monthViewPath.addMonth(monthViewPath.startMonth,
 
101
                                                 monthViewPath.indexType(index));
 
102
 
 
103
            isYearView: false
 
104
 
 
105
            onDateSelected: {
 
106
                monthViewPage.dateSelected(date);
118
107
            }
119
108
        }
120
109
    }