diff --git a/wallpapers/image/imagepackage/contents/ui/WallpaperDelegate.qml b/wallpapers/image/imagepackage/contents/ui/WallpaperDelegate.qml --- a/wallpapers/image/imagepackage/contents/ui/WallpaperDelegate.qml +++ b/wallpapers/image/imagepackage/contents/ui/WallpaperDelegate.qml @@ -19,6 +19,7 @@ import QtQuick 2.0 import QtQuick.Controls.Private 1.0 +import QtGraphicalEffects 1.0 import org.kde.kquickcontrolsaddons 2.0 import org.kde.plasma.components 2.0 as PlasmaComponents @@ -59,6 +60,23 @@ icon: "view-preview" visible: !walliePreview.visible } + + QPixmapItem { + id: blurBackgroundSource + visible: cfg_Blur + anchors.fill: parent + smooth: true + pixmap: model.screenshot + fillMode: QPixmapItem.PreserveAspectCrop + } + + FastBlur { + visible: cfg_Blur + anchors.fill: parent + source: blurBackgroundSource + radius: 4 + } + QPixmapItem { id: walliePreview anchors.fill: parent diff --git a/wallpapers/image/imagepackage/contents/ui/config.qml b/wallpapers/image/imagepackage/contents/ui/config.qml --- a/wallpapers/image/imagepackage/contents/ui/config.qml +++ b/wallpapers/image/imagepackage/contents/ui/config.qml @@ -32,6 +32,7 @@ property alias cfg_Color: colorDialog.color property string cfg_Image property int cfg_FillMode + property alias cfg_Blur: blurCheckBox.checked property var cfg_SlidePaths: "" property int cfg_SlideInterval: 0 @@ -125,6 +126,24 @@ } } + Row { + //x: formAlignment - positionLabel.paintedWidth + spacing: units.largeSpacing / 2 + QtControls.Label { + id: blurLabel + width: formAlignment - units.largeSpacing + anchors { + verticalCenter: blurCheckBox.verticalCenter + } + horizontalAlignment: Text.AlignRight + } + QtControls.CheckBox { + id: blurCheckBox + text: i18nd("plasma_applet_org.kde.image", "Use blur background filling") + checked: true + } + } + QtDialogs.ColorDialog { id: colorDialog modality: Qt.WindowModal diff --git a/wallpapers/image/imagepackage/contents/ui/main.qml b/wallpapers/image/imagepackage/contents/ui/main.qml --- a/wallpapers/image/imagepackage/contents/ui/main.qml +++ b/wallpapers/image/imagepackage/contents/ui/main.qml @@ -19,6 +19,7 @@ */ import QtQuick 2.5 +import QtGraphicalEffects 1.0 import org.kde.plasma.wallpapers.image 2.0 as Wallpaper import org.kde.plasma.core 2.0 as PlasmaCore @@ -210,6 +211,46 @@ } Image { + id: blurBackgroundSourceA + visible: wallpaper.configuration.Blur + anchors.fill: parent + asynchronous: true + cache: false + fillMode: Image.PreserveAspectCrop + source: imageA.source + } + + GaussianBlur { + visible: wallpaper.configuration.Blur + anchors.fill: parent + source: blurBackgroundSourceA + radius: 32 + samples: 65 + opacity: imageA.opacity + z: imageA.z + } + + Image { + id: blurBackgroundSourceB + visible: wallpaper.configuration.Blur + anchors.fill: parent + asynchronous: true + cache: false + fillMode: Image.PreserveAspectCrop + source: imageB.source + } + + GaussianBlur { + visible: wallpaper.configuration.Blur + anchors.fill: parent + source: blurBackgroundSourceB + radius: 32 + samples: 65 + opacity: imageB.opacity + z: imageB.z + } + + Image { id: imageA anchors.fill: parent asynchronous: true @@ -217,6 +258,7 @@ fillMode: wallpaper.configuration.FillMode autoTransform: true //new API in Qt 5.5, do not backport into Plasma 5.4. } + Image { id: imageB anchors.fill: parent