diff options
author | Jens Bache-Wiig <jens.bache-wiig@digia.com> | 2013-05-10 15:35:06 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-05-10 16:26:35 +0200 |
commit | b4e424e0e13f9336234dd06a556f3ec2899d173a (patch) | |
tree | 9bfc43a5ff3c3462dc98c6a97ebf7a78c205be88 /src | |
parent | 8f46d851ad31b500461c7c7ed5299eb6ca5e29a3 (diff) | |
download | qtquickcontrols-b4e424e0e13f9336234dd06a556f3ec2899d173a.tar.gz |
Automatically set toolbar width
Change-Id: I4038afc1cb22102f8873014d90dedec79cbaa376
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/controls/ApplicationWindow.qml | 6 | ||||
-rw-r--r-- | src/controls/StatusBar.qml | 3 | ||||
-rw-r--r-- | src/controls/ToolBar.qml | 1 |
3 files changed, 7 insertions, 3 deletions
diff --git a/src/controls/ApplicationWindow.qml b/src/controls/ApplicationWindow.qml index 44b6f187..f2e181a5 100644 --- a/src/controls/ApplicationWindow.qml +++ b/src/controls/ApplicationWindow.qml @@ -141,11 +141,12 @@ Window { id: backgroundItem anchors.fill: parent - Row { + Item { id: toolBarArea anchors.top: parent.top anchors.left: parent.left anchors.right: parent.right + height: childrenRect.height } Item { @@ -156,11 +157,12 @@ Window { anchors.bottom: statusBarArea.top } - Row { + Item { id: statusBarArea anchors.bottom: parent.bottom anchors.left: parent.left anchors.right: parent.right + height: childrenRect.height } onVisibleChanged: if (visible && menuBar) menuBar.__parentWindow = root diff --git a/src/controls/StatusBar.qml b/src/controls/StatusBar.qml index b5d9e4d8..248c16ee 100644 --- a/src/controls/StatusBar.qml +++ b/src/controls/StatusBar.qml @@ -70,7 +70,8 @@ Item { id: statusbar activeFocusOnTab: false Accessible.role: Accessible.StatusBar - implicitWidth: parent ? parent.width : loader.item ? loader.item.implicitHeight : 0 + width: parent ? parent.width : implicitWidth + implicitWidth: loader.item.implicitHeight implicitHeight: loader.item ? loader.item.implicitHeight : 0 property Component style: Qt.createComponent(Settings.theme() + "/StatusBarStyle.qml", statusbar) Loader { diff --git a/src/controls/ToolBar.qml b/src/controls/ToolBar.qml index abf8c2fa..71ef30a5 100644 --- a/src/controls/ToolBar.qml +++ b/src/controls/ToolBar.qml @@ -73,6 +73,7 @@ Item { id: toolbar activeFocusOnTab: false Accessible.role: Accessible.ToolBar + width: parent ? parent.width : implicitWidth implicitWidth: loader.item ? loader.item.implicitWidth : 0 implicitHeight: loader.item ? loader.item.implicitHeight : 0 property Component style: Qt.createComponent(Settings.theme() + "/ToolBarStyle.qml", toolbar) |