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

« back to all changes in this revision

Viewing changes to MonthComponent.qml

  • Committer: Kunal Parmar
  • Date: 2014-10-23 14:33:36 UTC
  • Revision ID: pkunal.parmar@gmail.com-20141023143336-8q35zkl31yoet61q
Font size caching

Show diffs side-by-side

added added

removed removed

Lines of Context:
108
108
        property bool isCurMonthTodayMonth: todayYear === curMonthYear && todayMonth == curMonth
109
109
        //offset from current month's first date to start date of current month
110
110
        property int offset: isCurMonthStartMonth ? -1 : (daysInStartMonth - monthStartDate)
 
111
 
 
112
        property int dateFontSize: FontUtils.sizeToPixels(root.dateLabelFontSize)
 
113
        property int dayFontSize: FontUtils.sizeToPixels(root.dayLabelFontSize)
111
114
    }
112
115
 
113
116
    Column{
208
211
 
209
212
            width: parent.dayWidth
210
213
            height: parent.dayHeight
 
214
            fontSize: intern.dateFontSize
211
215
        }
212
216
    }
213
217
 
230
234
            property var day :Qt.locale().standaloneDayName(( Qt.locale().firstDayOfWeek + index), Locale.ShortFormat)
231
235
            text: isYearView ? day.charAt(0) : day;
232
236
            horizontalAlignment: Text.AlignHCenter
233
 
            fontSize: root.dayLabelFontSize
 
237
            font.pixelSize: intern.dayFontSize
234
238
            color: "white"
235
239
        }
236
240
    }