on xenial help sign in
Set the background source size to the max we'll need + new background
2c64b7bAlbert Astals Cid
qml/Dash/DashBackground.qml+6−2
@@ -15,12 +15,16 @@
15 */
15 */
16
16
17import QtQuick 2.4
17import QtQuick 2.4
18+import QtQuick.Window 2.2
19+import Ubuntu.Thumbnailer 0.1
18
20
19Image {
21Image {
20− source: anchors.fill.width > anchors.fill.height ? "graphics/paper_landscape.png" : "graphics/paper_portrait.png"
22+ source: "image://thumbnailer/" + Qt.resolvedUrl("graphics/paper.png")
21 fillMode: Image.PreserveAspectCrop
23 fillMode: Image.PreserveAspectCrop
22 horizontalAlignment: Image.AlignRight
24 horizontalAlignment: Image.AlignRight
23 verticalAlignment: Image.AlignTop
25 verticalAlignment: Image.AlignTop
26+ // avoid CPU scaling when window size changes
27+ readonly property int maxSize: Math.max(Screen.width, Screen.height)
24− sourceSize.width: anchors.fill.width
28+ sourceSize.width: maxSize
25 sourceSize.height: 0
29 sourceSize.height: 0
26}
30}
qml/Dash/graphics/paper.pngnew file

Binary file not shown.

qml/Dash/graphics/paper_landscape@27.pngdeleted

Binary file not shown.

qml/Dash/graphics/paper_portrait@27.pngdeleted

Binary file not shown.