Skip to content

Conversation

@Dankirk
Copy link

@Dankirk Dankirk commented Jan 27, 2026

Description

Rework for slideshow plugin with a lot of refactoring and changes as detailed below.

Settings

  • [change, performance] Default visibility behavior changed from "always play" -> "pause/unpause" to save cpu/gpu/disk utilization when going by a quick default setup
  • [change, ux] Updating settings reset pause state only when automatic/manual mode is changed (ui will remain in the pause/play state it was if mode was not changed)
  • [new, ux] Opening/saving settings tries to preserve slideshow position, if the files at that position still match
  • [fix, ux] Fix transition always being re-created on settings update. Together with the above slides can be reloaded without flickering.

Stop button and Stop/Restart visibility behavior

  • [new, performance] Implemented Stop/restart visibility behavior to actually to stop, not just restart and always play
  • [new, performance] Stop frees loaded slide textures, reloaded on restart (saves memory)
  • [new, performance] Deactivating when visibility behavior is stop/restart frees loaded slide textures, reloaded on activate
  • [change, ux] Manual Stop/Restart use immediate cut transition instead of the set transition speed
  • [change, ux] Manual stop/pause state will not be reset on activate/deactivate, instead resume where you left off

Next/Prev button

  • [fix, ux] Next/prev and pause/play are re-routed to restart action if media is stopped (fixes media control ui state not mirroring actual state)
  • [change, ux] Removed throttling from next/prev actions when transition is active (more responsive ux)
  • [change, ux] Next/Prev media hotkeys work when slideshow is in automatic mode
  • [new, ux] Manual Next/Prev resets the automatic slide change timer (fix double changing slides in short time frame)

Signaling changes

  • [new] Activate / Deactivate send media_started / media_ended signals if visibility behavior is stop/restart as does the respective media control actions
  • [change] Updating settings sends media_ended / media_started signal only when appropriate (previously always media_started)

Motivation and Context

These are just my findings while working on other things.

A major issue was the not actually implemented Stop/Restart visibility behavior. Another is the subtle use of computing resources while the slideshow is not active/visible. The user might not realize the slideshow (maybe in another scene) is the source of that resource utilization. This stems from automatically rotating buffer of 11 slides that will repeatedly decode images from disk.

Slideshow' code is also in need of refactoring. Parts of it carry remnants older design and feels a bit of patchwork-y. I'm hoping this will make it easier to follow.

How Has This Been Tested?

Tested the changes by stopping, pausing, resuming, restarting and generally using the media controls. Tried switching the scenes while slideshow is in various states.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Tweak (non-breaking change to improve existing functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

@PatTheMav
Copy link
Member

PatTheMav commented Jan 30, 2026

Please do not open draft pull requests on the main repository unless explicitly asked to do so by the project. If this change is still a work in progress it should be finalised in a fork and a pull request opened once it's considered finished and it can be reviewed by project members.

If the pull requests depends on a bug fix, it is fine (and permitted) to include the bug fix in the branch and base the changes of the PR on that bug fix (the corresponding commits will be automatically resolved via a later rebase) and mention the dependency in the PR description.

@Dankirk Dankirk force-pushed the slideshow branch 3 times, most recently from cc36ce1 to 109f41d Compare January 30, 2026 19:16
@Dankirk
Copy link
Author

Dankirk commented Jan 30, 2026

My apologies for the draft pr. This is ready for review now.

This pr doesn't depend on the issues mentioned earlier, merely pointed out that they are not because of anything in this pr, considering this is quite hefty, in case someone runs in to them while testing.
I'm removing the linked issues from description, since it also happens the issues are no longer visible because the stop and restart buttons transition was changed from animated to a cut. (Not as a fix, but as better ux)

@Dankirk Dankirk marked this pull request as ready for review January 30, 2026 19:16
General changes:
- Default visibility behavior from "always play" -> "pause/unpause" to save cpu/gpu utilization
- Implemented Stop/restart visibility behavior to actually to stop, not just restart and always play
- Stop frees loaded slide textures, reloaded on restart (saves memory)
- Deactivating when visibility behavior is stop/restart frees loaded slide textures, reloaded on activate
- Manual stop/pause state will not be reset on activate/deactivate (resume where you left off)
- Manual/Automatic slides setting will not be overwritten by pressing any media controls.
- Next/prev and pause/play are re-routed to restart action if media is stopped (fixes media control ui state)
- Removed throttling from next/prev actions (more responsive ui)
- Next/Prev media hotkeys work when slideshow is in automatic mode
- Next/Prev resets the automatic slide change timer (fix double changing  slides)
- Updating settings reset pause state only when automatic/manual mode is changed (ui will remain in the pause/play state it was if mode was not changed)
- Updating settings tries to continue from existing slide position if files at that position match
- Fix transition always being recreated on settings update
- Manual Stop and Restart use cut transitions instead of the set transition speed

Signaling changes:
- Refactoring
- Activate / Deactivate send media_started / media_ended signals if visibility behavior is stop/restart as does the media control actions
- Updating settings sends media_ended / media_started signal only when appropriate (previously always media_started)
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.

2 participants