summaryrefslogtreecommitdiff
path: root/src/controls/Styles/Base/ApplicationWindowStyle.qml
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@digia.com>2014-09-08 15:04:59 +0200
committerJ-P Nurmi <jpnurmi@digia.com>2014-09-10 19:24:00 +0200
commit533b677351064177e1ba2d3082bb010e9f0ec473 (patch)
tree0e7b09745bc8f08374fe1d3044d936fa90dbcb95 /src/controls/Styles/Base/ApplicationWindowStyle.qml
parent378748b824887a45160219a9345e94e157ed5f89 (diff)
downloadqtquickcontrols-533b677351064177e1ba2d3082bb010e9f0ec473.tar.gz
Let ApplicationWindowStyle provide the layout
Change-Id: Ic14c153d57857efb5ad26e01f58ff3363b189b85 Reviewed-by: Jochen Seemann <seemann.jochen@gmail.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Diffstat (limited to 'src/controls/Styles/Base/ApplicationWindowStyle.qml')
-rw-r--r--src/controls/Styles/Base/ApplicationWindowStyle.qml48
1 files changed, 48 insertions, 0 deletions
diff --git a/src/controls/Styles/Base/ApplicationWindowStyle.qml b/src/controls/Styles/Base/ApplicationWindowStyle.qml
index 644cafdd..1d7f0afe 100644
--- a/src/controls/Styles/Base/ApplicationWindowStyle.qml
+++ b/src/controls/Styles/Base/ApplicationWindowStyle.qml
@@ -85,4 +85,52 @@ QtObject {
visible: !styleData.hasColor
color: SystemPaletteSingleton.window(true)
}
+
+ /*! \internal */
+ property Component panel: Item {
+ readonly property alias contentArea: contentArea
+ readonly property alias menuBarArea: menuBarArea
+ readonly property alias toolBarArea: toolBarArea
+ readonly property alias statusBarArea: statusBarArea
+
+ Loader {
+ anchors.fill: parent
+ sourceComponent: background
+ }
+
+ Item {
+ id: contentArea
+ anchors.top: toolBarArea.bottom
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.bottom: statusBarArea.top
+ }
+
+ Item {
+ id: toolBarArea
+ anchors.top: parent.menuBarArea.bottom
+ anchors.left: parent.left
+ anchors.right: parent.right
+ implicitHeight: childrenRect.height
+ height: visibleChildren.length > 0 ? implicitHeight: 0
+ }
+
+ Item {
+ id: menuBarArea
+ anchors.top: parent.top
+ anchors.left: parent.left
+ anchors.right: parent.right
+ implicitHeight: childrenRect.height
+ height: visibleChildren.length > 0 ? implicitHeight: 0
+ }
+
+ Item {
+ id: statusBarArea
+ anchors.bottom: parent.bottom
+ anchors.left: parent.left
+ anchors.right: parent.right
+ implicitHeight: childrenRect.height
+ height: visibleChildren.length > 0 ? implicitHeight: 0
+ }
+ }
}