diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-11-25 14:26:31 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-11-25 14:26:37 +0100 |
commit | 22769ac6a7667bf1d2d5b5e6421a15e4f6aadce1 (patch) | |
tree | dc76832e65fae17b99089d9cf7b41ef87aad1e7e /src/imports/controls/material/Drawer.qml | |
parent | eba5b547e7f1c3817d172936293e03535225f8ee (diff) | |
parent | ac99683595e27b4157f9fd397fefa378955e275c (diff) |
Merge remote-tracking branch 'origin/5.8' into dev
Change-Id: If528b9f4e502c50e0cd76df75404e257232f0d18
Diffstat (limited to 'src/imports/controls/material/Drawer.qml')
-rw-r--r-- | src/imports/controls/material/Drawer.qml | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/imports/controls/material/Drawer.qml b/src/imports/controls/material/Drawer.qml index 855b5d88..55cabc9a 100644 --- a/src/imports/controls/material/Drawer.qml +++ b/src/imports/controls/material/Drawer.qml @@ -50,15 +50,32 @@ T.Drawer { contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0) contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0) + topPadding: !dim && edge === Qt.BottomEdge && Material.elevation === 0 + leftPadding: !dim && edge === Qt.RightEdge && Material.elevation === 0 + rightPadding: !dim && edge === Qt.LeftEdge && Material.elevation === 0 + bottomPadding: !dim && edge === Qt.TopEdge && Material.elevation === 0 + enter: Transition { SmoothedAnimation { velocity: 5 } } exit: Transition { SmoothedAnimation { velocity: 5 } } + Material.elevation: 16 + background: Rectangle { color: control.Material.dialogColor + Rectangle { + readonly property bool horizontal: control.edge === Qt.LeftEdge || control.edge === Qt.RightEdge + width: horizontal ? 1 : parent.width + height: horizontal ? parent.height : 1 + color: control.Material.dividerColor + x: control.edge === Qt.LeftEdge ? parent.width - 1 : 0 + y: control.edge === Qt.TopEdge ? parent.height - 1 : 0 + visible: !control.dim && control.Material.elevation === 0 + } + layer.enabled: control.position > 0 layer.effect: ElevationEffect { - elevation: 16 + elevation: control.Material.elevation fullHeight: true } } |