aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/material
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-11-25 14:26:31 +0100
committerJ-P Nurmi <jpnurmi@qt.io>2016-11-25 14:26:37 +0100
commit22769ac6a7667bf1d2d5b5e6421a15e4f6aadce1 (patch)
treedc76832e65fae17b99089d9cf7b41ef87aad1e7e /src/imports/controls/material
parenteba5b547e7f1c3817d172936293e03535225f8ee (diff)
parentac99683595e27b4157f9fd397fefa378955e275c (diff)
Merge remote-tracking branch 'origin/5.8' into dev
Diffstat (limited to 'src/imports/controls/material')
-rw-r--r--src/imports/controls/material/Drawer.qml19
-rw-r--r--src/imports/controls/material/qquickmaterialripple_p.h1
2 files changed, 19 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
}
}
diff --git a/src/imports/controls/material/qquickmaterialripple_p.h b/src/imports/controls/material/qquickmaterialripple_p.h
index 5b86fb2a..6fdcd28d 100644
--- a/src/imports/controls/material/qquickmaterialripple_p.h
+++ b/src/imports/controls/material/qquickmaterialripple_p.h
@@ -49,6 +49,7 @@
//
#include <QtQuick/qquickitem.h>
+#include <QtGui/qcolor.h>
QT_BEGIN_NAMESPACE