From bacca991e0245305934f9ec7dc9832fd206fee87 Mon Sep 17 00:00:00 2001 From: nowrep Date: Wed, 25 Apr 2012 11:20:41 +0200 Subject: [PATCH] SpeedDial: fixed removing bg image when changing background position --- src/lib/data/html/speeddial.html | 4 ++++ src/lib/plugins/speeddial.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/data/html/speeddial.html b/src/lib/data/html/speeddial.html index d55b6ef4b..ce141096f 100644 --- a/src/lib/data/html/speeddial.html +++ b/src/lib/data/html/speeddial.html @@ -338,6 +338,7 @@ function sdSizeToggle() { var check = document.getElementById('SdSizeToggle'); var SdSize = document.getElementById('SdSize'); var SdSizeSl = document.getElementById('sliderValueSd'); + SdSize.disabled = (check.checked ? false : true); SdSize.value = (check.checked ? SdSize.value : 231); SdSizeSl.innerHTML = (check.checked ? DIAL_WIDTH : 231); @@ -347,9 +348,11 @@ function bgImgUpdate() { var imgUrl = document.getElementById('BgImgHold').value; var imgSize = document.getElementById('BgImgSelSiz').value; var imgThumb = document.getElementById('thumb'); + imgThumb.style.backgroundImage = 'url("' + imgUrl + '")'; imgThumb.title = imgUrl.substring(imgUrl.lastIndexOf('/')+1); imgThumb.style.backgroundSize = imgSize; + document.body.style.backgroundImage = 'url("' + imgUrl + '")'; document.body.style.backgroundSize = imgSize; } @@ -377,6 +380,7 @@ $(document).ready(function () { %INITIAL-SCRIPT% alignPage(); + $(window).resize(function() { alignPage(); }); $("div").disableSelection(); $("#quickdial").sortable({ diff --git a/src/lib/plugins/speeddial.cpp b/src/lib/plugins/speeddial.cpp index b3ce5f9ba..81a0a6944 100644 --- a/src/lib/plugins/speeddial.cpp +++ b/src/lib/plugins/speeddial.cpp @@ -293,7 +293,7 @@ QString SpeedDial::urlFromUserInput(const QString &url) void SpeedDial::setBackgroundImage(const QString &image) { - m_backgroundImage = QUrl(image).toEncoded(); + m_backgroundImage = image; } void SpeedDial::setBackgroundImageSize(const QString &size)