[CmdPal] Animated notification#48176
Open
niels9001 wants to merge 2 commits into
Open
Conversation
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Summary of the Pull Request
Gives the CmdPal toast notification a glow-up: it now slides in/out with a nice fade, has acrylic + a soft shadow, and stops fighting with
SizeToContent.Along the way, the toast guts got refactored into a couple of reusable bits that live in
PowerToys.Common.UI.Controlsso other PowerToys utilities can grab them for their own transient overlays:TransparentWindow— aWindowEx-derived host that strips the native frame, hides from taskbar/Alt-Tab, usesTransparentTintBackdropfor transparency, and runs show/hide implicit animations on its content. Supply your own animations viaShowAnimations/HideAnimations, or take the defaults (fade + slide).TransparentCard— a templatedContentControlwith acrylic (AlwaysActiveDesktopAcrylicBackdrop), rounded corners, border, and shadow. Drop whatever XAML you want inside.AlwaysActiveDesktopAcrylicBackdrop— smallSystemBackdropwrapper so the acrylic doesn''t go grey when the window isn''t focused (transient overlays are never focused).CmdPal''s
ToastWindowis now basically a 16-line wrapper: derives fromTransparentWindow, drops a boundTextBlockinside, and handles its own 2.5s auto-hide timer + bottom-center positioning.cmdpal-toast.mp4
PR Checklist
Detailed Description of the Pull Request / Additional comments
A couple of design notes worth calling out:
SetWindowRgnandEnableWindowtricks to make it click-through too, but neither plays nicely with WinUI 3''s DesktopWindowXamlSource. Small transparent frame is the pragmatic compromise.ShowAnimations/HideAnimationsso there''s zero animation code inToastWindow.xaml.cs.TransparentCard.xamlis registered inThemes/Generic.xaml— required for templated controls in a library project;<GenerateLibraryLayout>alone doesn''t auto-merge per-control xaml.Validation Steps Performed