aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickcontrols/material/Popup.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/quickcontrols/material/Popup.qml')
-rw-r--r--src/quickcontrols/material/Popup.qml11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/quickcontrols/material/Popup.qml b/src/quickcontrols/material/Popup.qml
index 7727ef0d3c..e443a1c2ff 100644
--- a/src/quickcontrols/material/Popup.qml
+++ b/src/quickcontrols/material/Popup.qml
@@ -9,8 +9,6 @@ import QtQuick.Controls.Material.impl
T.Popup {
id: control
- Material.elevation: 24
-
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
contentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
@@ -18,6 +16,9 @@ T.Popup {
padding: 12
+ Material.elevation: 4
+ Material.roundedScale: Material.ExtraSmallScale
+
enter: Transition {
// grow_fade_in
NumberAnimation { property: "scale"; from: 0.9; to: 1.0; easing.type: Easing.OutQuint; duration: 220 }
@@ -31,12 +32,14 @@ T.Popup {
}
background: Rectangle {
- radius: 2
+ // FullScale doesn't make sense for Popup.
+ radius: control.Material.roundedScale
color: control.Material.dialogColor
layer.enabled: control.Material.elevation > 0
- layer.effect: ElevationEffect {
+ layer.effect: RoundedElevationEffect {
elevation: control.Material.elevation
+ roundedScale: control.Material.roundedScale
}
}