[calendar] Fix binding loops

This commit is contained in:
Martin Klapetek 2015-11-16 11:52:55 -05:00
parent b65195ee65
commit f9d7fc87d5

View File

@ -103,13 +103,17 @@ MouseArea {
Components.Label { Components.Label {
id: label id: label
anchors.fill: parent anchors.fill: todayRect
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
text: model.label || dayNumber text: model.label || dayNumber
opacity: isCurrent ? 1.0 : 0.5 opacity: isCurrent ? 1.0 : 0.5
wrapMode: Text.NoWrap wrapMode: Text.NoWrap
elide: Text.ElideRight elide: Text.ElideRight
font.pixelSize: Math.max(theme.smallestFont.pixelSize, Math.floor(daysCalendar.cellHeight / 3))
// This is to avoid the "Both point size and
// pixel size set. Using pixel size" warnings
font.pointSize: undefined
color: today ? theme.backgroundColor : theme.textColor color: today ? theme.backgroundColor : theme.textColor
Behavior on color { Behavior on color {
ColorAnimation { duration: units.shortDuration * 2 } ColorAnimation { duration: units.shortDuration * 2 }