Material: add support for elevation to Page

Since Page control is supposed to be a derivate of Pane it should
support Material.elevation too

Change-Id: I05ad88d1fa9756456ac1672e40551200622bf120
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
This commit is contained in:
Fabio Falsini 2023-04-11 20:31:04 +02:00
parent fba9a80d47
commit e774a88e51
1 changed files with 6 additions and 0 deletions

View File

@ -4,6 +4,7 @@
import QtQuick
import QtQuick.Templates as T
import QtQuick.Controls.Material
import QtQuick.Controls.Material.impl
T.Page {
id: control
@ -19,5 +20,10 @@ T.Page {
background: Rectangle {
color: control.Material.backgroundColor
layer.enabled: control.enabled && control.Material.elevation > 0
layer.effect: ElevationEffect {
elevation: control.Material.elevation
}
}
}