aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/material/Popup.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports/controls/material/Popup.qml')
-rw-r--r--src/imports/controls/material/Popup.qml25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/imports/controls/material/Popup.qml b/src/imports/controls/material/Popup.qml
index d882840a..19fd6b79 100644
--- a/src/imports/controls/material/Popup.qml
+++ b/src/imports/controls/material/Popup.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,13 +35,15 @@
****************************************************************************/
import QtQuick 2.6
-import QtGraphicalEffects 1.0
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.material 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Material 2.0
+import QtQuick.Controls.Material.impl 2.0
T.Popup {
id: control
+ Material.elevation: 24
+
implicitWidth: Math.max(background ? background.implicitWidth : 0,
contentWidth > 0 ? contentWidth + leftPadding + rightPadding : 0)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
@@ -50,7 +52,7 @@ T.Popup {
contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
- padding: 6
+ padding: 12
enter: Transition {
// grow_fade_in
@@ -67,15 +69,12 @@ T.Popup {
contentItem: Item { }
background: Rectangle {
- radius: 3
+ radius: 2
color: control.Material.dialogColor
- layer.enabled: true
- layer.effect: DropShadow {
- verticalOffset: 1
- color: control.Material.dropShadowColor
- samples: 15
- spread: 0.5
+ layer.enabled: control.Material.elevation > 0
+ layer.effect: ElevationEffect {
+ elevation: control.Material.elevation
}
}
}