Use imagecache for all AssetImageProvider images

TextureImageCacheCollector is added to the existing async image cache
to generate thumbnails for image files.

Fixes: QDS-8581
Change-Id: I4a334b3241688d7a61a0560463bff32763a216a5
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Miikka Heikkinen
2023-01-16 13:55:02 +02:00
parent 88e75709d4
commit 15d92cf1e5
17 changed files with 171 additions and 88 deletions

View File

@@ -61,9 +61,10 @@ Rectangle {
Image {
source: "image://materialBrowserTex/" + textureSource
asynchronous: true
sourceSize.width: root.width - 10
sourceSize.height: root.height - 10
width: root.width - 10
height: root.height - 10
anchors.centerIn: parent
smooth: true
fillMode: Image.PreserveAspectFit
}
}

View File

@@ -116,8 +116,6 @@ Row {
Image {
id: thumbnail
asynchronous: true
sourceSize.height: 96
sourceSize.width: 96
height: 96
width: 96
fillMode: Image.PreserveAspectFit

View File

@@ -35,8 +35,9 @@ Column {
Image {
id: texturePreview
asynchronous: true
sourceSize.width: 150
sourceSize.height: 150
width: 150
height: 150
fillMode: Image.PreserveAspectFit
anchors.centerIn: parent
source: "image://qmldesigner_thumbnails/" + resolveResourcePath(backendValues.source.valueToString)
}