From 7b1acdc1bfb741b3bb7c2fef2b485af61e737953 Mon Sep 17 00:00:00 2001 From: Fatih Uzunoglu Date: Fri, 20 Sep 2024 17:54:59 +0300 Subject: [PATCH] qml: use `DynamicShadow` in `Player.qml` --- modules/gui/qt/player/qml/Player.qml | 31 ++++++++++++++++------------ 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/modules/gui/qt/player/qml/Player.qml b/modules/gui/qt/player/qml/Player.qml index f5fa3798e820..90002a21c900 100644 --- a/modules/gui/qt/player/qml/Player.qml +++ b/modules/gui/qt/player/qml/Player.qml @@ -322,6 +322,24 @@ FocusScope { readonly property real sizeConstant: 2.7182 + Widgets.DynamicShadow { + anchors.centerIn: cover + sourceItem: cover + + color: Qt.rgba(0, 0, 0, .18) + yOffset: VLCStyle.dp(24) + blurRadius: VLCStyle.dp(54) + } + + Widgets.DynamicShadow { + anchors.centerIn: cover + sourceItem: cover + + color: Qt.rgba(0, 0, 0, .22) + yOffset: VLCStyle.dp(5) + blurRadius: VLCStyle.dp(14) + } + Image { id: cover @@ -350,19 +368,6 @@ FocusScope { if (status === Image.Ready) backgroundImage.scheduleUpdate() } - - // TODO: Qt >= 6.4 Investigate using MultiEffect. - Widgets.DoubleShadow { - anchors.centerIn: parent - sourceItem: parent - - cache: false - - primaryVerticalOffset: VLCStyle.dp(24) - primaryBlurRadius: VLCStyle.dp(54) - secondaryVerticalOffset: VLCStyle.dp(5) - secondaryBlurRadius: VLCStyle.dp(14) - } } }