Skip to content

feat(wallcards): add smooth animated transitions between static and video wallpapers#812

Open
sc0dyx wants to merge 2 commits into
noctalia-dev:mainfrom
sc0dyx:feature/smooth-transition
Open

feat(wallcards): add smooth animated transitions between static and video wallpapers#812
sc0dyx wants to merge 2 commits into
noctalia-dev:mainfrom
sc0dyx:feature/smooth-transition

Conversation

@sc0dyx
Copy link
Copy Markdown
Contributor

@sc0dyx sc0dyx commented May 3, 2026

Previously, switching video wallpapers caused an abrupt cut because mpvpaper was started immediately, ignoring Noctalia's built‑in wallpaper animation.

Now video wallpapers transition smoothly:
First, the video's first frame (thumbnail) is set as wallpaper, triggering the system animation (fade/wipe/etc.).
After waiting exactly Settings.data.wallpaper.transitionDuration, mpvpaper starts with the live video.

sc0dyx added 2 commits May 3, 2026 16:08
mpvpaperRun and wallpaperCommand now accepts 'duration' (ms) and uses
'sleep ms/1000'
wallpaperCommand passes duration to mpvpaperRun for video entries
… duration

Read global transitionDuration from
Settings.data.wallpaper.transitionDuration
For video: set thumbnail via WallpaperService (animated), then delay
mpvpaper
For static: explicitly kill mpvpaper to avoid background residue
Pass duration to Utils.wallpaperCommand
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 3, 2026

@tonigineer - this PR modifies your plugin. Please review when you have a chance.

Comment thread wallcards/Wallcards.qml
var wallpaperPath = f.isVideo ? f.thumbnail : f.filePath;
WallpaperService.changeWallpaper(wallpaperPath);

if (f.isVideo) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Utils.wallpaperCommand already differentiates between video and image. The if/else is therefore not needed here.

@tonigineer
Copy link
Copy Markdown
Contributor

I don't see that much of a difference on my system, but I am fine with adding it. Nevertheless, the transition between videos is still not great. I will keep it in mind and take care of it later.

@sc0dyx
Copy link
Copy Markdown
Contributor Author

sc0dyx commented May 3, 2026

ok, thank you

@spiros132
Copy link
Copy Markdown
Collaborator

@tonigineer do you feel like this is ready to get merged in or should @sc0dyx change something in the PR?

@tonigineer
Copy link
Copy Markdown
Contributor

Hola @spiros132,

I already commented, that I think, there is something that is unnecessary. But if you want to close the PR, merge it. I would take care of it in a next PR with a change from my side.

Best regards,
Toni

@spiros132
Copy link
Copy Markdown
Collaborator

@sc0dyx do you want to add the suggested changes or should I merge this in?

@sc0dyx
Copy link
Copy Markdown
Contributor Author

sc0dyx commented May 14, 2026

@sc0dyx do you want to add the suggested changes or should I merge this in?

"ok, add the changes"

@spiros132
Copy link
Copy Markdown
Collaborator

@sc0dyx can you also bump the version number?

@tonigineer
Copy link
Copy Markdown
Contributor

If @sc0dyx is touching that PR again, he could also have a look at my remark ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants