From 3d0305a9ca603a85391283422b5e4ade39f1edd6 Mon Sep 17 00:00:00 2001 From: DanS Date: Tue, 21 Jul 2026 14:09:03 -0500 Subject: [PATCH] fix(ui): darken the logo SVG detail on light skins MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The SVG's white highlight (detail) washed out against a light card/background on light skins — the dragon's wings/detail nearly vanished, leaving only the accent body. Make the detail colour theme-aware: white on dark skins (unchanged), the theme's on-surface colour (dark) on light skins, so the full mark reads on both. Applies to the header logo and the balance coin icon; re-rasterizes on the dark↔light flip (already tracked by the logo guard). The fixed-brand ":drgx:" emoji is unaffected (its crimson body carries white detail fine on any bubble). Co-Authored-By: Claude Opus 4.8 (1M context) --- src/app.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/app.cpp b/src/app.cpp index dcc1836..c0f474d 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -1375,6 +1375,9 @@ void App::ensureLogoTexture() logo_loaded_ = true; logo_is_dark_variant_ = wantDark; logo_accent_ = logoAccent; + // The SVG's white highlight (detail) stays white on dark skins, but darkens to the theme's on-surface + // colour on light skins so it doesn't wash out against a light card/background. + const ImU32 detailCol = wantDark ? IM_COL32(255, 255, 255, 255) : ui::material::OnSurface(); if (logo_tex_) util::DestroyTexture(logo_tex_); // free the previous texture before replacing logo_tex_ = 0; logo_w_ = 0; logo_h_ = 0; @@ -1384,7 +1387,7 @@ void App::ensureLogoTexture() if (coin_logo_tex_) util::DestroyTexture(coin_logo_tex_); coin_logo_tex_ = 0; coin_logo_w_ = 0; coin_logo_h_ = 0; coin_logo_loaded_ = true; - if (!util::LoadTextureFromSvg(embedded::kLogoDragonXSvg, 128, logoAccent, IM_COL32(255, 255, 255, 255), + if (!util::LoadTextureFromSvg(embedded::kLogoDragonXSvg, 128, logoAccent, detailCol, &coin_logo_tex_, &coin_logo_w_, &coin_logo_h_)) { auto coinElem = ui::schema::UI().drawElement("components.main-window", "coin-icon"); auto cit = coinElem.extraColors.find("icon"); @@ -1405,7 +1408,7 @@ void App::ensureLogoTexture() // at ~2x the 128px viewBox for crisp downscaling. This is the branding on every skin; the per-skin // PNG path below is only a fallback if rasterization ever fails. if (util::LoadTextureFromSvg(embedded::kLogoDragonXSvg, 256, logoAccent, - IM_COL32(255, 255, 255, 255), &logo_tex_, &logo_w_, &logo_h_)) { + detailCol, &logo_tex_, &logo_w_, &logo_h_)) { DEBUG_LOGF("Rendered DragonX SVG logo (%dx%d, accent %08X)\n", logo_w_, logo_h_, logoAccent); return; }