diff options
author | J-P Nurmi <jpnurmi@digia.com> | 2014-06-07 12:30:21 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-06-11 09:51:49 +0200 |
commit | 0e70cedb2248e54b132822d5be925825fed918d3 (patch) | |
tree | 9bc587aa0bb24d84cb0284051a3c45480d912c62 /src/controls/Styles/Base/CalendarStyle.qml | |
parent | b69bccacffa24194233e6c08cc0d2ee3626552e1 (diff) | |
download | qtquickcontrols-0e70cedb2248e54b132822d5be925825fed918d3.tar.gz |
CalendarStyle: do not hard code the height of dayOfWeekDelegate
Task-number: QTBUG-39482
Change-Id: I7b610a098402f5ec684fc0d7f9b47c4b9981e733
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Diffstat (limited to 'src/controls/Styles/Base/CalendarStyle.qml')
-rw-r--r-- | src/controls/Styles/Base/CalendarStyle.qml | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/controls/Styles/Base/CalendarStyle.qml b/src/controls/Styles/Base/CalendarStyle.qml index e30f8417..741c4549 100644 --- a/src/controls/Styles/Base/CalendarStyle.qml +++ b/src/controls/Styles/Base/CalendarStyle.qml @@ -285,9 +285,12 @@ Style { /*! The delegate that styles each weekday. + + The height of the weekday row is calculated based on the maximum implicit height of the delegates. */ property Component dayOfWeekDelegate: Rectangle { color: gridVisible ? "#fcfcfc" : "transparent" + implicitHeight: 40 Label { text: control.__locale.dayName(styleData.dayOfWeek, control.dayOfWeekFormat) anchors.centerIn: parent @@ -314,7 +317,7 @@ Style { property alias navigationBarItem: navigationBarLoader.item - readonly property real dayOfWeekHeaderRowHeight: 40 + property alias dayOfWeekHeaderRow: dayOfWeekHeaderRow readonly property int weeksToShow: 6 readonly property int rows: weeksToShow @@ -364,7 +367,6 @@ Style { anchors.left: parent.left anchors.leftMargin: (control.weekNumbersVisible ? weekNumbersItem.width : 0) anchors.right: parent.right - height: dayOfWeekHeaderRowHeight spacing: gridVisible ? __gridLineWidth : 0 Repeater { @@ -376,7 +378,6 @@ Style { id: dayOfWeekDelegateLoader sourceComponent: dayOfWeekDelegate width: __cellRectAt(index).width - height: dayOfWeekHeaderRow.height readonly property var __dayOfWeek: dayOfWeek @@ -439,7 +440,7 @@ Style { } } Rectangle { - anchors.topMargin: - navigationBarLoader.height + anchors.topMargin: - dayOfWeekHeaderRow.height - 1 anchors.top: parent.top anchors.bottom: parent.bottom |