1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-06 13:38:28 -04:00

fix(Notifications): update flexible image caching in DankCircularImage

- Fixes #2480
This commit is contained in:
purian23
2026-07-04 01:26:56 -04:00
parent da44e07cf7
commit 0509694d78
4 changed files with 7 additions and 2 deletions
+3 -2
View File
@@ -10,6 +10,7 @@ Rectangle {
property string imageSource: ""
property string fallbackIcon: "notifications"
property string fallbackText: ""
property bool cacheImages: true
property bool hasImage: imageSource !== ""
readonly property bool shouldProbe: imageSource !== "" && !imageSource.startsWith("image://")
// Probe with AnimatedImage first; once loaded, check frameCount to decide.
@@ -65,7 +66,7 @@ Rectangle {
fillMode: Image.PreserveAspectCrop
smooth: true
mipmap: true
cache: true
cache: root.cacheImages
visible: false
source: root.shouldProbe ? root.imageSource : ""
}
@@ -79,7 +80,7 @@ Rectangle {
fillMode: Image.PreserveAspectCrop
smooth: true
mipmap: true
cache: true
cache: root.cacheImages
visible: false
sourceSize.width: Math.max(width * 2, 128)
sourceSize.height: Math.max(height * 2, 128)