Border animations: fix full-screen flash on first attach#140
Open
Krathe82 wants to merge 1 commit into
Open
Conversation
LCG glow effects (Pulsate/Chase/Flash/Proc) read their target frame's width/height at start. On the very first attach the animRect was only just created, so the layout engine hadn't sized it yet (GetWidth() == 0) and the glow rendered huge / detached for one frame — the brief full-screen flash, reproducible in test mode. Start the glow only once the target has a real size; if it isn't laid out yet, defer to the next frame (after the layout pass). A per-start token — replaced by a newer Start and cleared by StopAnimation — guarantees a deferred start that was superseded or stopped never fires. The OnUpdate overlay effects are unaffected: they anchor relative to the rect's corners (which resolve through the anchor chain immediately) and start at alpha 0.
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.
Problem
Border animation glow effects (Pulsate / Chase / Flash / Proc) read their target frame's width/height when they start. On the very first attach the animation rectangle had only just been created, so the layout engine hadn't sized it yet —
GetWidth()returns 0 — and the glow rendered huge / detached from the actual border for a single frame. The result is a brief full-screen flash, easily reproduced by enabling a glow border animation in test mode.Fix
Start the glow only once the target has a real size. If it isn't laid out yet, defer the start to the next frame (after the layout pass) so it always starts against valid geometry.
A per-start token — replaced by a newer Start and cleared by
StopAnimation— guarantees a deferred start that was superseded or stopped in the meantime never fires (no double glow, no orphan glow).The OnUpdate overlay effects (Wipe / Ripple / Segment Reveal / Sides Only / Corners Only) are unaffected: they anchor relative to the rect's corners — which resolve through the anchor chain immediately, independent of the numeric width — and start at alpha 0.