on xenial help sign in
Fix sourceSize thanks to Saviq
commit8f3c2631119ce358fa6742062a58db7951090ff0 authorAndrea Cimitan <andrea.cimitan@canonical.com> dateTue 16 Jul 2013, 13:24 (13 years ago) parente39795f
1 file changed+4−4
Shell.qml+4−4
Shell.qml+4−4
@@ -121,12 +121,12 @@ FocusScope {
121121 function updateImage() {
122122 if (testImage.status == Image.Ready) {
123123 if (shell.width / shell.height <= testImage.sourceSize.width / testImage.sourceSize.height) {
124− backgroundImage.sourceSize = undefined
125− backgroundImage.sourceSize.height = shell.height
124+ backgroundImage.sourceSize.width = 0
125+ backgroundImage.sourceSize.height = Qt.binding(function() { return shell.height })
126126 }
127127 else {
128− backgroundImage.sourceSize = undefined
129− backgroundImage.sourceSize.width = shell.width
128+ backgroundImage.sourceSize.height = 0
129+ backgroundImage.sourceSize.width = Qt.binding(function() { return shell.width })
130130 }
131131
132132 shell.background = testImage.source