Replace DropShadow with a prerendered shadow image to boost performance

This commit is contained in:
Luis Ángel San Martín 2024-12-29 18:55:57 +01:00
parent 44ae4cc2a6
commit 974bc40e90
5 changed files with 28 additions and 19 deletions

View File

@ -27,5 +27,6 @@
<file>qml/InfoTick.qml</file>
<file>qml/InfoFavorites.qml</file>
<file>qml/InfoRating.qml</file>
<file>qml/prerendered_cover_shadow.png</file>
</qresource>
</RCC>

View File

@ -65,15 +65,19 @@ SplitView {
NumberAnimation { duration: 90 }
}
DropShadow {
anchors.fill: realCell
horizontalOffset: 0
verticalOffset: 0
radius: 8.0
samples: 17
color: "#FF000000"
source: realCell
visible: showDropShadow;
BorderImage {
anchors {
top: realCell.top
left: realCell.left
right: realCell.right
bottom: realCell.bottom
margins: -10
}
border { left: 10; top: 10; right: 10; bottom: 10 }
horizontalTileMode: BorderImage.Stretch
verticalTileMode: BorderImage.Stretch
source: "prerendered_cover_shadow.png"
visible: showDropShadow
}
Rectangle {

View File

@ -67,16 +67,19 @@ SplitView {
NumberAnimation { duration: 90 }
}
DropShadow {
anchors.fill: realCell
transparentBorder: true
horizontalOffset: 0
verticalOffset: 0
radius: 10.0
//samples: 17
color: "#FF000000"
source: realCell
visible: showDropShadow;
BorderImage {
anchors {
top: realCell.top
left: realCell.left
right: realCell.right
bottom: realCell.bottom
margins: -10
}
border { left: 10; top: 10; right: 10; bottom: 10 }
horizontalTileMode: BorderImage.Stretch
verticalTileMode: BorderImage.Stretch
source: "prerendered_cover_shadow.png"
visible: showDropShadow
}
Rectangle {

Binary file not shown.

After

Width:  |  Height:  |  Size: 289 B

View File

@ -27,5 +27,6 @@
<file>qml/info-tag@2x.png</file>
<file>qml/info-tick.png</file>
<file>qml/info-tick@2x.png</file>
<file>qml/prerendered_cover_shadow.png</file>
</qresource>
</RCC>