Skip to content

fix(ui): glass no longer flickers beside moving lines and around hovered cards - #152

Merged
Fly-onlyone merged 1 commit into
masterfrom
fix/glass-flicker
Nov 26, 2026
Merged

Fly-onlyone merged 1 commit into
masterfrom
fix/glass-flicker

Conversation

@Fly-onlyone

Copy link
Copy Markdown
Owner

Fixes the flashing reported after the UI port: at the top and bottom of the window all the time, and
around components under the pointer.

Cause

BackdropBlur blurred "what is on the canvas under it". That is only right in a frame that redraws
the whole window. A frame that redraws a small part (the line under the header, the line in the
sidebar, a hovered card) leaves the pixels around that part as the frame before left them, with
cards and text on them. Blurring those gives another picture, so glass changed its look from frame
to frame.

Change

  • GlassBackdrop keeps one blurred picture of the background. EffectsLayer takes it right after
    drawing the background, only in a frame that redraws everything.
  • Every sheet of glass draws its part of that picture. Glass on glass draws nothing.
  • The scrim of a dialog keeps the old behaviour (IsLive), because it must blur the page.
  • One blur per background frame instead of one per sheet of glass per frame.

Checked

  • Glass pixels beside the sidebar line, 36 window frames, same build switched between the two ways:
    5 and 2 jumps of brightness the old way, 0 and 0 the new way.
  • A resting pointer keeps a stable hover look in both ways, so the hover state itself was not the
    fault.
  • 952 tests pass, one new (glass on glass draws no backdrop).

Not measured: what the screen shows while the pointer moves onto a card. The cause is the same, but
I could not film it reliably.

…red cards

A sheet of glass blurred "what is on the canvas under it". That is only right in a frame
that redraws the whole window. Most frames redraw a small part (the line under the
header, the line in the sidebar, a card under the pointer), and then the pixels around
that part are those of the frame before, with cards and text on them. The blur of them
is another picture, so the glass changed its look from frame to frame.

Now the background is taken once, right after it was drawn in a frame that redraws
everything, blurred at a quarter of its size and kept (GlassBackdrop). Every sheet of
glass draws its part of that picture, whatever the frame redraws. Glass that lies on
glass draws nothing. The scrim of a dialog still blurs the page under it (IsLive).

Measured on glass beside the sidebar line, 36 frames: 5 and 2 jumps of brightness the
old way, none the new way.
Copilot AI balanced review requested due to automatic review settings November 26, 2026 11:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@Fly-onlyone
Fly-onlyone merged commit 76af7c8 into master Nov 26, 2026
6 checks passed
@Fly-onlyone
Fly-onlyone deleted the fix/glass-flicker branch November 26, 2026 11:28
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