Repository navigation
config-profiles: add a transition when switching profiles - #4414
Merged
Merged
Conversation
Switching a profile rebuilt the bar, colors and wallpaper piece by piece, and the colors snapped in whenever the theme generation finished. Every apply (activate, cycle, applyGroups, IPC) now goes through one request path in ConfigProfileService. While a switch runs, DMSShell lazily loads ProfileSwitchOverlay: one Overlay-layer window per screen shows an in-process capture of that screen. The profile is applied once every capture has been shown by the compositor (the second frame swap), and the reveal waits until Theme.generatingTheme is false and every wallpaper window has decoded its new image, at most 3 s. The frozen capture is then dissolved with a transition effect, animated on the render thread with a UniformAnimator. The cursor stays live; the overlay takes clicks until the reveal ends. Service timers make sure the apply and the end happen even if the overlay never answers or the apply throws. The activation toast shows after the reveal, and IPC replies "Switching to" while the switch is still running. The profile picker applies its pick after it has closed, so it is not part of the frozen picture. The Behavior card on the Profiles page gets Transition (Follow wallpaper, None, Random or an effect) and Transition duration. Both are in the profile's wallpaper group, so the profile being switched to decides. Follow wallpaper uses the wallpaper transition and the new wallpaper transition duration setting (it was a fixed 1000 ms). None, also through Follow wallpaper, applies at once without the freeze. Random picks one effect for all screens and Reduce motion fades. Pixelate only distorts the incoming image, which here is the live screen, so the reveal runs it backwards on the frozen one. A partial apply can't replace a switch already queued behind the running one. The picker look (configProfilePickerView) is saved in the profile's general group too. WallpaperBackground's 7 near-identical transition ShaderEffects become one WallpaperTransitionEffect, shared with the overlay, and the random pick and per-effect parameters move into WallpaperTransitions.js. Under a switch the wallpaper swaps without its own transition. New Tiles and Ripple wallpaper transitions, also available for plain wallpaper changes and in the default Random set. A ShaderEffect only reports Compiled for the first instance per shader (Qt's shader cache), so the reveal gates on not Error.
Contributor
Claude reviewLooks good. No issues found. Checked: the switch request, queue and end path in ConfigProfileService (activate, applyGroups, cycle, the IPC replies, the limit timers, the throw-safe endSwitch); the ProfileSwitchOverlay freeze, settle and reveal flow with its Timing tokens; the wallpaper hold and immediate-set during a switch; Theme.generatingTheme and the _colorsReloading set and clear paths; the shared WallpaperTransitionEffect against the uniform blocks of the old and new shaders; the picker deferring activation until close; the settings, session and profile group maps; i18n reuse; deprecated shims. The settings are documented in dux-docs#224. Model: claude-opus-5-5. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Switching a profile used to rebuild the bar, colors and wallpaper piece by piece, and the colors snapped in whenever the theme generation finished. Now the screen holds the old look while the profile is applied and the new colors are generated, then a transition reveals the new look all at once. This works for every way of switching (Settings, the picker, the Control Center tile,
config-profile apply/next/prev) and for partial apply.The Behavior card on the Manage profiles page got two now settings: Transition and Transition duration.
Both are saved with the profile's wallpaper (since its related to the wallpaper transition), so the profile being switched to decides the transition. Transition defaults to Follow wallpaper, which uses that profile's wallpaper transition and its duration. It can also be set to a specific effect or Random, and None turns the transition off. Reduce motion turns every effect into a fade. The cursor stays live during the hold, but clicks are blocked until the reveal is done. If the new colors take longer than 3 seconds it reveals anyway to avoid a long freeze.
There are two new effects, Tiles and Ripple, which also work for normal wallpaper changes. The wallpaper transition also got a duration setting (it was always 1 second), which the profile switch uses when it follows the wallpaper transition.
This is the last PR of a set of changes for profiles and builds on the Behavior card from #4388. The picker look from that PR is now saved in profiles too. While a switch is running
config-profile apply/next/prevreply "Switching to" instead of "Switched to", since the switch isn't done yet when the reply is sent.Notes
The 7 copies of the transition effect in the wallpaper background are one shared component now, which the switch reveal reuses.
Plain wallpaper changes with dynamic colors still snap the colors in after the wallpaper transition. Using the same hold there is something I work on separately
1 new term to translate: Follow wallpaper.
Type of change
Related issues
Screenshots / video
recording_2026-11-25_19-14-34.mp4
Checklist
I18n.tr()with translator context, reusing existing terms where possiblemake fmt, added/updated tests,make testpasses, andgo mod tidyis cleanmake lint-qmlwith no new warnings