diff options
author | J-P Nurmi <jpnurmi@theqtcompany.com> | 2015-06-23 23:40:43 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@theqtcompany.com> | 2015-06-23 21:48:54 +0000 |
commit | 6be049cd9ab30dae1e30668e3d032fe4ec04cefe (patch) | |
tree | 9f396627ec721f81eae2de2a8f087655c7d23641 /examples | |
parent | 37875ee82ad8306e8a74008a19068e65ee9897d4 (diff) |
Kill CalendarDelegate
The default CalendarView delegate implementation will be included in
the "Customizing CalendarView" docs. That should be enough to get
started, so we avoid exposing such type and committing to its API for
now. Hiding it from the API allows also a bit simpler implementation
=> getting rid of the wrapper item reduces the total amount of items
in a CalendarView from 87 to 45.
Change-Id: Idac693347df72377b3bb518fb1bab505d20d6f12
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/quick/calendar/main.qml | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/quick/calendar/main.qml b/examples/quick/calendar/main.qml index 82d71ecb..759e93a8 100644 --- a/examples/quick/calendar/main.qml +++ b/examples/quick/calendar/main.qml @@ -124,12 +124,16 @@ ApplicationWindow { onClicked: calendar.selectedDate = date - delegate: CalendarDelegate { + delegate: Text { text: model.day width: delegate.contentItem.width / 7 height: delegate.contentItem.height / 6 opacity: model.month === delegate.month ? 1 : 0 color: model.today ? Theme.accentColor : Theme.textColor + minimumPointSize: 8 + fontSizeMode: Text.Fit + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter Rectangle { z: -1 anchors.centerIn: parent |