aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickcontrols/ios/Drawer.qml
diff options
context:
space:
mode:
authorTor Arne Vestbø <[email protected]>2024-12-13 23:03:25 +0100
committerTor Arne Vestbø <[email protected]>2024-12-19 12:39:38 +0100
commit3a0dc0a93fe354a2ee72bfbb38a1f536bd64bf67 (patch)
tree4660aed8c1be993e6bb5a5871396cf8aea25dac0 /src/quickcontrols/ios/Drawer.qml
parent43083e644174ceea08802127cefcbcc6f8e0e485 (diff)
Take safe areas into account for Qt Quick Controls Drawer
When the drawer is pulled in from the side we want it keep its content away from the non-safe areas, while still drawing the background edge to edge. Pick-to: 6.9 Change-Id: Iff145df719f5746cbdb1d3c13494967c5993c6e6 Reviewed-by: Doris Verria <[email protected]> Reviewed-by: Mitch Curtis <[email protected]>
Diffstat (limited to 'src/quickcontrols/ios/Drawer.qml')
-rw-r--r--src/quickcontrols/ios/Drawer.qml5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/quickcontrols/ios/Drawer.qml b/src/quickcontrols/ios/Drawer.qml
index 7db1ef51c9..f6b35be43e 100644
--- a/src/quickcontrols/ios/Drawer.qml
+++ b/src/quickcontrols/ios/Drawer.qml
@@ -19,6 +19,11 @@ T.Drawer {
property real inset: control.dim ? 8 : 0
property bool vertical: control.edge === Qt.LeftEdge || control.edge === Qt.RightEdge
+ topPadding: SafeArea.margins.top
+ leftPadding: SafeArea.margins.left
+ rightPadding: SafeArea.margins.right
+ bottomPadding: SafeArea.margins.bottom
+
rightInset: background && control.edge === Qt.LeftEdge ? -inset : 0
leftInset: background && control.edge === Qt.RightEdge ? -inset : 0
bottomInset: background && control.edge === Qt.TopEdge ? -inset : 0