Wallpaper blur background filling effect feature
ClosedPublic

Authored by guoyunhe on Aug 1 2017, 7:46 PM.

Details

Reviewers
ngraham
Group Reviewers
Plasma: Workspaces
Summary

Add a checkbox to wallpaper configuration dialog. By checking this option, empty space surround image will be filled by blurred image rather than a color.

Diff Detail

Repository
R120 Plasma Workspace
Lint
Lint Skipped
Unit
Unit Tests Skipped
guoyunhe created this revision.Aug 1 2017, 7:46 PM
Restricted Application added a project: Plasma. · View Herald TranscriptAug 1 2017, 7:46 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik added a subscriber: broulik.Aug 1 2017, 7:51 PM

Pretty cool idea!

wallpapers/image/imagepackage/contents/ui/WallpaperDelegate.qml
73

I think for the preview a FastBlur is sufficient, or perhaps even just scaling up a tiny pixmap

wallpapers/image/imagepackage/contents/ui/config.qml
142

I'm not too happy with this label but I can't think of a better phrase either..

wallpapers/image/imagepackage/contents/ui/main.qml
213

Is it possible to re-use the currentImage instead of creating yet another Image item? I know with ShaderEffect you can do hideSource: false but I don't see this in GaussianBlur :/

226

You might want to set the source to null when it's disabled otherwise we end up blurring (even when disabled):

source: wallpaper.configuration.Blur ? blurBackgroundSource : null
guoyunhe updated this revision to Diff 17518.Aug 1 2017, 8:39 PM

Solve some coding issue. Use two GaussianBlur to keep sync with image slideshow.

guoyunhe marked 2 inline comments as done.Aug 1 2017, 8:47 PM
guoyunhe added inline comments.
wallpapers/image/imagepackage/contents/ui/main.qml
213

If we re-use currentImage, the image must be scaled up. It results in much lower blur quality. So I think a new Image item is still necessary.

Later I found if only provide one blur, when slideshow switching, the image and background doesn't change at the same time. So I have to use two blur, one for imageA, one for imageB. Though blur rendering is still a little lag on low end hardware, but much better than before.

226

Yes, it is good to disable blurring when not using this option. But if I add this line, blur will not be rendered. I cannot figure out the reason for the moment.

guoyunhe updated this revision to Diff 17538.Aug 2 2017, 6:57 AM
guoyunhe marked an inline comment as done.

Improve image transition animation. Image transition and blur background transition are now synchronous and smooth.

ngraham requested changes to this revision.Oct 22 2017, 11:16 PM
ngraham added a subscriber: ngraham.

It occurs to me that only the "Scaled, Keep Proportions" and "Centered" positioning modes require any kind of background effect or color. With other positioning modes, the existing Background Color chooser is completely superfluous, and adding additional background effects only further exacerbates this UI disconnect when using other modes.

I have an idea: Add a new two-item set of Radio Buttons, and use that to choose whether the background is a solid color or your new blur feature (which is very cool), and only show this new Radio Button control if the user has selected the "Scaled, Keep Proportions" or "Centered" positioning mode.

This revision now requires changes to proceed.Oct 22 2017, 11:16 PM

It occurs to me that only the "Scaled, Keep Proportions" and "Centered" positioning modes require any kind of background effect or color. With other positioning modes, the existing Background Color chooser is completely superfluous, and adding additional background effects only further exacerbates this UI disconnect when using other modes.

I have an idea: Add a new two-item set of Radio Buttons, and use that to choose whether the background is a solid color or your new blur feature (which is very cool), and only show this new Radio Button control if the user has selected the "Scaled, Keep Proportions" or "Centered" positioning mode.

This is good suggestion but first, I would like to see if this "blur background" feature will be accepted. If it was accepted, I would like to improve more things. Otherwise, the effort may not worth.

ngraham accepted this revision.Oct 23 2017, 9:39 PM

Personally I approve, in and of itself the feature looks fine. I think we should consider the UI though, as adding more background effects exacerbates an existing problem. But I won't overload this patch to include that. :)

This revision is now accepted and ready to land.Oct 23 2017, 9:39 PM
guoyunhe closed this revision.Oct 24 2017, 8:48 AM

This patch has been committed to master branch. I will add the color/blur-image radio buttons in another patch.

@guoyunhe, Nice! In the future can you use the arc land instead of committing manually? That way all the history and details in the Summary here gets added to the commit, and we have a better paper trail. Thanks!