fix(material): light-theme modal backdrop reads light, not dark

BlurFloat overlays draw a full-window veil over the live blur so the card-less
floating modal content reads as foreground. The light-theme branch used a strong
neutral DARK veil (IM_COL32(16,18,24,200)) on the theory that "light content pops
on a dark veil" — but on a light theme the modal chrome is dark-on-light, so it
sank INTO the veil: the heading, description, Sort row, and the create/scan/
reveal/close buttons all washed out to low-contrast dark-on-dark, and a "light"
theme read dark whenever a modal opened.

UI controls already carry a dropshadow on light themes for figure/ground, so the
backdrop no longer needs to supply contrast by going dark. Switch the light-theme
veil to a theme-tinted LIGHT frost (WithAlpha(Background(), 205)); the dark-theme
branch is untouched. Fixes every BlurFloat modal at once.

Verified via full sweep: marble / light read as clean light frost with all chrome
legible, dune gets a theme-appropriate warm frost, and obsidian (dark) is
unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-14 16:09:16 -05:00
parent f6024557d5
commit b6b4fdacb5

View File

@@ -746,13 +746,13 @@ inline void DrawFullWindowBlurBackdrop(ImDrawList* dl, const ImVec2& pMin, const
params.absoluteBlurRadius = true; // fixed modal blur — independent of the user's acrylic slider
params.fallbackColor.w = 1.0f; // full-strength blur so the live content reads
effects::ImGuiAcrylic::DrawAcrylicRect(dl, pMin, pMax, params, 0.0f);
// Dim over the blur so the floating (card-less) modal reads as foreground. On DARK themes the
// theme-tinted frost darkens the backdrop and the light content pops. On LIGHT themes that same
// tint whitens the backdrop and leaves card-less content with no figure/ground separation — so
// light themes get a neutral dark veil instead, which also makes the modal's fields/buttons stand
// out from the (now slightly greyed) surround. Both a touch stronger than before (was alpha 70).
// Veil over the blur so the floating (card-less) modal reads as foreground. On DARK themes a
// theme-tinted frost darkens the backdrop and the light content pops. On LIGHT themes the modal's
// own controls carry a dropshadow for figure/ground, so the backdrop stays LIGHT — a theme-tinted
// light frost — rather than a dark veil (which made a "light" theme read dark and sank the
// dark-on-light chrome into it).
if (IsLightTheme())
dl->AddRectFilled(pMin, pMax, IM_COL32(16, 18, 24, 200)); // neutral dark veil anchors on white
dl->AddRectFilled(pMin, pMax, WithAlpha(Background(), 205)); // light frost — dropshadows give shape
else
dl->AddRectFilled(pMin, pMax, WithAlpha(Background(), 120)); // theme-tinted darken, stronger
}