Grab and Move: tight warning-gold overlay border + Always On Top 4px default#48474
Open
crutkas wants to merge 4 commits into
Open
Grab and Move: tight warning-gold overlay border + Always On Top 4px default#48474crutkas wants to merge 4 commits into
crutkas wants to merge 4 commits into
Conversation
The default highlight border was 15px, which is visually heavy. Drop the default to 4px for a tighter, more refined frame. Existing users keep their configured value; only fresh installs / reset pick up the new default. Slider range (1-30) is unchanged. Kept in sync across the C++ (Settings.h) and C# (AlwaysOnTopProperties.cs) defaults. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
85ca4e6 to
036d493
Compare
This comment has been minimized.
This comment has been minimized.
Refine the drag/resize overlay so it hugs the visible window frame instead of the old full-window white wash that was offset by the invisible resize border: - Keep the prior translucent white wash over the visible window and add a tight warning-gold border on top. Both hug the visible frame and are rounded to match the window corners. The accent is Fluent warning gold (#FFB900, the literal equivalent of WinUI SystemFillColorCaution, used as a ThemeResource for warnings across the Settings UI; a Win32 layered window can't resolve a ThemeResource). - Anchor to DWMWA_EXTENDED_FRAME_BOUNDS (inset by the invisible-border margins) instead of GetWindowRect, and match the corner radius via DWMWA_WINDOW_CORNER_PREFERENCE; thickness and radius scale with the window DPI. - The border is drawn just inside the visible edge while Always On Top draws its border just outside it, so the two naturally stack into a clean double layer with no special-casing (constant 4px). Rendering keeps the GDI + UpdateLayeredWindow per-pixel-alpha path and adds GDI+ (a system library) for the antialiased, rounded fill and border. Window-frame metrics are computed once per drag/resize, never in the mouse-move hot path. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
036d493 to
688d975
Compare
Member
Author
|
after this, i think the two UX subsystems should be unified from same code . |
DHowett
reviewed
Jun 11, 2026
DHowett
left a comment
Member
There was a problem hiding this comment.
pending notes. i would reduce the burden of comments by at least half, and also make the description of the PR like... i dunno, two lines? two lines would be fine.
adjusting comments
Member
Author
|
comments addressed per dustin |
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
Refines the Grab and Move drag/resize overlay so it matches the polish of Always on Top (AoT), and lowers the AoT default border thickness. Created at the request of @crutkas.
Two related border-refinement changes, kept in one PR because the Grab and Move "double layer" is designed around AoT's border.
Recording.2026-06-11.130417.mp4
1. Always on Top - default border thickness 15 -> 4
The default highlight border was
15px, which is visually heavy. Dropped to4pxfor a tighter, Fluent-style frame.src/modules/alwaysontop/AlwaysOnTop/Settings.h(C++ default)src/settings-ui/Settings.UI.Library/AlwaysOnTopProperties.cs(DefaultFrameThickness)4. Slider range (1-30) is unchanged.2. Grab and Move - tight, warning-gold overlay (fill + border)
Previously the overlay was a full translucent white wash sized to
GetWindowRect, which includes the invisible resize-border / shadow margins (~7px) - so it sat off the visible window. It now hugs the visible frame, mirroring AoT:DWMWA_EXTENDED_FRAME_BOUNDS(inset by the invisible-border margins) instead ofGetWindowRect.DWMWA_WINDOW_CORNER_PREFERENCE(same mapping AoT uses); border thickness and radius scale with the target window DPI.#FFB900- the literal equivalent of WinUISystemFillColorCaution(used as aThemeResourcefor warnings across the Settings UI; a Win32 layered window can't resolve aThemeResource, so a literal is required). Keeps Grab and Move visually distinct from AoT's accent-blue.Rendering keeps the existing GDI +
UpdateLayeredWindowper-pixel-alpha path and adds GDI+ (a Windows system library - no new third-party dependency) for the antialiased, rounded fill and border. Frame metrics are computed once per drag/resize (never in the mouse-move hot path). The optional geometry label is unchanged.Before / After
Validation
GrabAndMove,AlwaysOnTop, andSettings.UI.Library(Code Analysis / C26451 clean).Follow-up (not in this PR)
AoT and Grab and Move remain separate overlay systems (AoT: persistent per-window Direct2D border; Grab and Move: transient GDI/
UpdateLayeredWindowoverlay). They can't share one runtime window, but the frame-geometry + corner-detection + DPI helpers are worth extracting intosrc/common(seeded by AoT'sWindowCornersUtil/ScalingUtils). Tracked separately to keep this PR atomic (src/commonis an ABI-careful area).Notes