summaryrefslogtreecommitdiff
path: root/src/controls/ToolBar.qml
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>2015-03-20 16:57:09 +0100
committerTor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>2015-03-27 14:18:55 +0000
commit10a57f37d0f03e8642a7c92dcacf287c95777342 (patch)
tree123950f0d8c555bd44886fe73b74b0eb8d90e785 /src/controls/ToolBar.qml
parent1c0deaf9805903f4f33ff09056b3153fd92b5618 (diff)
downloadqtquickcontrols-10a57f37d0f03e8642a7c92dcacf287c95777342.tar.gz
iOS: Make ApplicationWindow fill entire screen, including under statusbar
We take advantage of the new Qt::WindowFlag that asks the OS to maximize the window using as much as possible of the available screen geometry, and then make sure that the contentItem is shifted accordingly so that it doesn't end up under the statusbar. This allow setting a custom background image/color on the application window, or adding toolbars or menu bars that underlay the iOS system status bar. Change-Id: I6efab2aced7efd274a65f2524ae8c270d20de187 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Diffstat (limited to 'src/controls/ToolBar.qml')
-rw-r--r--src/controls/ToolBar.qml10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/controls/ToolBar.qml b/src/controls/ToolBar.qml
index 48f62f16..6a72a9b2 100644
--- a/src/controls/ToolBar.qml
+++ b/src/controls/ToolBar.qml
@@ -139,7 +139,7 @@ FocusScope {
sourceComponent: style
}
},
- Item {
+ ContentItem {
id: container
z: 1
focus: true
@@ -150,10 +150,10 @@ FocusScope {
anchors.rightMargin: rightMargin + (buttonLoader.active ? buttonLoader.width + rightMargin : 0)
anchors.bottomMargin: bottomMargin
- property int topMargin: __style ? __style.padding.top : 0
- property int bottomMargin: __style ? __style.padding.bottom : 0
- property int leftMargin: __style ? __style.padding.left : 0
- property int rightMargin: __style ? __style.padding.right : 0
+ property int topMargin: (__style ? __style.padding.top : 0) + systemPadding.top
+ property int bottomMargin: (__style ? __style.padding.bottom : 0) + systemPadding.bottom
+ property int leftMargin: (__style ? __style.padding.left : 0) + systemPadding.left
+ property int rightMargin: (__style ? __style.padding.right : 0) + systemPadding.right
property Item layoutItem: container.children.length === 1 ? container.children[0] : null
property real layoutWidth: layoutItem ? (layoutItem.implicitWidth || layoutItem.width) +