Use the thumbnailer to load the dash background
In the worst case (not in cache) we're a bit slower since we need to go through some extra steps for the resizing
but hopefully most of the cases the file will be in cache and we save the resizing on boot
commit7dc3f368717d237320643bfb477238ccd511ada7
authorAlbert Astals Cid <albert.astals@canonical.com>
dateFri 18 Dec 2015, 09:59 (11 years ago)
parent3323450
qml/Dash/DashBackground.qml+2−1
@@ -16,9 +16,10 @@
1616
1717import QtQuick 2.4
1818import QtQuick.Window 2.2
19+import Ubuntu.Thumbnailer 0.1
1920
2021Image {
21− source: "graphics/paper.png"
22+ source: "image://thumbnailer/" + Qt.resolvedUrl("graphics/paper.png").substr(7) // 7 is file://
2223 fillMode: Image.PreserveAspectCrop
2324 horizontalAlignment: Image.AlignRight
2425 verticalAlignment: Image.AlignTop