media controls: go back to qt5 opacity mask to prevent crash

This commit is contained in:
end-4
2025-05-20 23:03:34 +02:00
parent d0c180f8fc
commit b1b6e837ba
@@ -3,6 +3,7 @@ import "root:/modules/common/widgets"
import "root:/services" import "root:/services"
import "root:/modules/common/functions/string_utils.js" as StringUtils import "root:/modules/common/functions/string_utils.js" as StringUtils
import "root:/modules/common/functions/color_utils.js" as ColorUtils import "root:/modules/common/functions/color_utils.js" as ColorUtils
import Qt5Compat.GraphicalEffects
import QtQuick import QtQuick
import QtQuick.Effects import QtQuick.Effects
import QtQuick.Layouts import QtQuick.Layouts
@@ -103,7 +104,7 @@ Item { // Player instance
} }
ClippingRectangle { // Background Rectangle { // Background
id: background id: background
anchors.fill: parent anchors.fill: parent
anchors.margins: Appearance.sizes.elevationMargin anchors.margins: Appearance.sizes.elevationMargin
@@ -111,13 +112,12 @@ Item { // Player instance
radius: root.popupRounding radius: root.popupRounding
layer.enabled: true layer.enabled: true
layer.effect: MultiEffect { layer.effect: OpacityMask {
source: background maskSource: Rectangle {
anchors.fill: background width: background.width
shadowEnabled: true height: background.height
shadowColor: Appearance.colors.colShadow radius: background.radius
shadowVerticalOffset: 1 }
shadowBlur: 0.5
} }
Image { Image {
@@ -154,12 +154,22 @@ Item { // Player instance
anchors.margins: root.contentPadding anchors.margins: root.contentPadding
spacing: 15 spacing: 15
ClippingRectangle { // Art backgrounmd Rectangle { // Art background
id: artBackground
Layout.fillHeight: true Layout.fillHeight: true
implicitWidth: height implicitWidth: height
radius: root.artRounding radius: root.artRounding
color: blendedColors.colLayer1 color: blendedColors.colLayer1
layer.enabled: true
layer.effect: OpacityMask {
maskSource: Rectangle {
width: artBackground.width
height: artBackground.height
radius: artBackground.radius
}
}
Image { // Art image Image { // Art image
id: mediaArt id: mediaArt
property int size: parent.height property int size: parent.height