diff options
author | J-P Nurmi <jpnurmi@digia.com> | 2014-06-06 23:55:20 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-06-10 13:50:58 +0200 |
commit | 1d87aeefac8ea8a4572fa186a82477bd84d67a3f (patch) | |
tree | a207e4a56015c720176f193fc414c59365851b74 | |
parent | 84937934fcc235ba9212ad9847a64f3268c427d3 (diff) | |
download | qtquickcontrols-1d87aeefac8ea8a4572fa186a82477bd84d67a3f.tar.gz |
Calendar: respect style provided size
Task-number: QTBUG-39473
Change-Id: Ic0f874a6015b13b4833c6e1d6441c54d9533e2da
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
-rw-r--r-- | src/controls/Calendar.qml | 3 | ||||
-rw-r--r-- | src/controls/Styles/Base/CalendarStyle.qml | 8 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/controls/Calendar.qml b/src/controls/Calendar.qml index 5b56dc76..11b20b37 100644 --- a/src/controls/Calendar.qml +++ b/src/controls/Calendar.qml @@ -74,9 +74,6 @@ import QtQuick.Controls.Private 1.0 Control { id: calendar - implicitWidth: 250 - implicitHeight: 250 - /*! \qmlproperty date Calendar::selectedDate diff --git a/src/controls/Styles/Base/CalendarStyle.qml b/src/controls/Styles/Base/CalendarStyle.qml index 8d4b0783..e30f8417 100644 --- a/src/controls/Styles/Base/CalendarStyle.qml +++ b/src/controls/Styles/Base/CalendarStyle.qml @@ -161,9 +161,13 @@ Style { /*! The background of the calendar. + + The implicit size of the calendar is calculated based on the implicit size of the background delegate. */ property Component background: Rectangle { color: "#fff" + implicitWidth: 250 + implicitHeight: 250 } /*! @@ -305,8 +309,8 @@ Style { property Component panel: Item { id: panelItem - implicitWidth: 200 - implicitHeight: 200 + implicitWidth: backgroundLoader.implicitWidth + implicitHeight: backgroundLoader.implicitHeight property alias navigationBarItem: navigationBarLoader.item |