1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 09:32:12 +01:00

SpeedDial: fixed removing bg image when changing background position

This commit is contained in:
nowrep 2012-04-25 11:20:41 +02:00
parent fa37d1650f
commit bacca991e0
2 changed files with 5 additions and 1 deletions

View File

@ -338,6 +338,7 @@ function sdSizeToggle() {
var check = document.getElementById('SdSizeToggle'); var check = document.getElementById('SdSizeToggle');
var SdSize = document.getElementById('SdSize'); var SdSize = document.getElementById('SdSize');
var SdSizeSl = document.getElementById('sliderValueSd'); var SdSizeSl = document.getElementById('sliderValueSd');
SdSize.disabled = (check.checked ? false : true); SdSize.disabled = (check.checked ? false : true);
SdSize.value = (check.checked ? SdSize.value : 231); SdSize.value = (check.checked ? SdSize.value : 231);
SdSizeSl.innerHTML = (check.checked ? DIAL_WIDTH : 231); SdSizeSl.innerHTML = (check.checked ? DIAL_WIDTH : 231);
@ -347,9 +348,11 @@ function bgImgUpdate() {
var imgUrl = document.getElementById('BgImgHold').value; var imgUrl = document.getElementById('BgImgHold').value;
var imgSize = document.getElementById('BgImgSelSiz').value; var imgSize = document.getElementById('BgImgSelSiz').value;
var imgThumb = document.getElementById('thumb'); var imgThumb = document.getElementById('thumb');
imgThumb.style.backgroundImage = 'url("' + imgUrl + '")'; imgThumb.style.backgroundImage = 'url("' + imgUrl + '")';
imgThumb.title = imgUrl.substring(imgUrl.lastIndexOf('/')+1); imgThumb.title = imgUrl.substring(imgUrl.lastIndexOf('/')+1);
imgThumb.style.backgroundSize = imgSize; imgThumb.style.backgroundSize = imgSize;
document.body.style.backgroundImage = 'url("' + imgUrl + '")'; document.body.style.backgroundImage = 'url("' + imgUrl + '")';
document.body.style.backgroundSize = imgSize; document.body.style.backgroundSize = imgSize;
} }
@ -377,6 +380,7 @@ $(document).ready(function () {
%INITIAL-SCRIPT% %INITIAL-SCRIPT%
alignPage(); alignPage();
$(window).resize(function() { alignPage(); }); $(window).resize(function() { alignPage(); });
$("div").disableSelection(); $("div").disableSelection();
$("#quickdial").sortable({ $("#quickdial").sortable({

View File

@ -293,7 +293,7 @@ QString SpeedDial::urlFromUserInput(const QString &url)
void SpeedDial::setBackgroundImage(const QString &image) void SpeedDial::setBackgroundImage(const QString &image)
{ {
m_backgroundImage = QUrl(image).toEncoded(); m_backgroundImage = image;
} }
void SpeedDial::setBackgroundImageSize(const QString &size) void SpeedDial::setBackgroundImageSize(const QString &size)