on xenial help sign in
Set the background source size to the max we'll ever need
b9a10caAlbert Astals Cid
qml/Dash/DashBackground.qml+3−1
@@ -15,12 +15,14 @@
15 */
15 */
16
16
17import QtQuick 2.0
17import QtQuick 2.0
18+import QtQuick.Window 2.2
18
19
19Image {
20Image {
20 source: anchors.fill.width > anchors.fill.height ? "graphics/paper_landscape.png" : "graphics/paper_portrait.png"
21 source: anchors.fill.width > anchors.fill.height ? "graphics/paper_landscape.png" : "graphics/paper_portrait.png"
21 fillMode: Image.PreserveAspectCrop
22 fillMode: Image.PreserveAspectCrop
22 horizontalAlignment: Image.AlignRight
23 horizontalAlignment: Image.AlignRight
23 verticalAlignment: Image.AlignTop
24 verticalAlignment: Image.AlignTop
25+ property int maxSize: Math.max(Screen.width, Screen.height)
24− sourceSize.width: anchors.fill.width
26+ sourceSize.width: maxSize
25 sourceSize.height: 0
27 sourceSize.height: 0
26}
28}