qml: use inline component in PlayButton

This commit is contained in:
Fatih Uzunoglu 2024-04-05 15:28:59 +03:00 committed by Steve Lhomme
parent f17fe8e429
commit 6233126bfc
1 changed files with 11 additions and 21 deletions

View File

@ -238,44 +238,34 @@ T.Control {
implicitWidth: height
implicitHeight: VLCStyle.icon_medium
// TODO: Qt >= 5.15 use inline component for the drop shadows
Widgets.DropShadowImage {
id: hoverShadow
component DropShadowImage : Widgets.DropShadowImage {
anchors.centerIn: parent
visible: opacity > 0
opacity: 0
blurRadius: VLCStyle.dp(9)
yOffset: VLCStyle.dp(4)
color: VLCStyle.setColorAlpha(theme.accent, 0.29)
rectWidth: parent.width
rectHeight: parent.height
xRadius: parent.width
yRadius: xRadius
}
Widgets.DropShadowImage {
DropShadowImage {
id: hoverShadow
blurRadius: VLCStyle.dp(9)
yOffset: VLCStyle.dp(4)
color: VLCStyle.setColorAlpha(theme.accent, 0.29)
}
DropShadowImage {
id: focusShadow
anchors.centerIn: parent
visible: opacity > 0
opacity: 0
blurRadius: VLCStyle.dp(14)
yOffset: VLCStyle.dp(1)
color: VLCStyle.setColorAlpha(theme.accent, 1.0)
rectWidth: parent.width
rectHeight: parent.height
xRadius: parent.width
yRadius: xRadius
}
Rectangle {