fix(theme): mop-up per-skin nits — ratio bar + light-skin muted text
Lower-severity polish from the per-skin review: - Market portfolio ratio bar: was full-saturation Success/Warning at a208 over a white a10 track — the green read as "neon" on dark skins and the track was invisible on light skins. Make it theme-aware: muted fills (a165) on dark, a dark track on light so the bar is defined on white/pastel surfaces. - Light-skin muted text: bump --on-surface-disabled 0.52 -> 0.62 on light/ color-pop-light/dune/marble/iridescent so secondary text (addresses, category labels) clears the pastel/gradient backgrounds (analog of the dark-skin bump). Remaining review nits are the "white-overlay-assumes-dark" track/hover pattern (a broader separate sweep) and per-skin aesthetic trade-offs; deferred. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1738,16 +1738,20 @@ static void mktDrawPortfolio(const MktCtx& cx)
|
||||
float transpW = barW - shieldedW;
|
||||
ImVec2 barStart(cx0, cy);
|
||||
|
||||
// Theme-aware: a dark track (not an invisible white one) on light skins, and slightly muted
|
||||
// fills on dark skins where full-saturation Success/Warning read as a neon bar.
|
||||
const bool barLight = IsLightTheme();
|
||||
const int fillA = barLight ? 205 : 165;
|
||||
dl->AddRectFilled(barStart, ImVec2(barStart.x + barW, barStart.y + ratioBarH),
|
||||
IM_COL32(255, 255, 255, 10), 3.0f);
|
||||
barLight ? IM_COL32(0, 0, 0, 20) : IM_COL32(255, 255, 255, 10), 3.0f);
|
||||
if (shieldedW > 0.5f)
|
||||
dl->AddRectFilled(barStart, ImVec2(barStart.x + shieldedW, barStart.y + ratioBarH),
|
||||
WithAlpha(Success(), 200),
|
||||
WithAlpha(Success(), fillA),
|
||||
transpW > 0.5f ? ImDrawFlags_RoundCornersLeft : ImDrawFlags_RoundCornersAll, 3.0f);
|
||||
if (transpW > 0.5f)
|
||||
dl->AddRectFilled(ImVec2(barStart.x + shieldedW, barStart.y),
|
||||
ImVec2(barStart.x + barW, barStart.y + ratioBarH),
|
||||
WithAlpha(Warning(), 200),
|
||||
WithAlpha(Warning(), fillA),
|
||||
shieldedW > 0.5f ? ImDrawFlags_RoundCornersRight : ImDrawFlags_RoundCornersAll, 3.0f);
|
||||
|
||||
// market_pct_shielded is "%.0f%% Shielded" — pass a double (an int to %f is UB).
|
||||
|
||||
Reference in New Issue
Block a user