fix(ui): restore ObsidianDragon logo in header and About tab
ensureLogoTexture() rasterized the embedded DragonX SVG into logo_tex_ and
returned early (added in 1752500 "themed DragonX logo"), so the app/product
branding — the top-left header (app.cpp AddImage) and the About tab
(getLogoTexture) — showed the DragonX coin mark instead of the ObsidianDragon
logo. Drop that step so logo_tex_ resolves via the intended path: active-skin
override → ui.toml header-icon → bundled ObsidianDragon dark/light PNG (disk,
then embedded RESOURCE_LOGO). The DragonX SVG stays for coin_logo_tex_ (balance
card) and drgx_emoji_tex_ (chat emoji), which are the currency mark and correct.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
13
src/app.cpp
13
src/app.cpp
@@ -1502,16 +1502,11 @@ void App::ensureLogoTexture()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 0) DragonX mark — rasterize the embedded SVG recolored to the theme (body = accent, detail = white)
|
// The header / top-left / About branding is the ObsidianDragon PRODUCT logo — NOT the DragonX coin
|
||||||
// at ~2x the 128px viewBox for crisp downscaling. This is the branding on every skin; the per-skin
|
// mark (that is coin_logo_tex_ / drgx_emoji_tex_ above). Resolve it below: active-skin override, else
|
||||||
// PNG path below is only a fallback if rasterization ever fails.
|
// the ui.toml header-icon, else the bundled ObsidianDragon dark/light PNG (disk, then embedded).
|
||||||
if (util::LoadTextureFromSvg(embedded::kLogoDragonXSvg, 256, logoAccent,
|
|
||||||
detailCol, &logo_tex_, &logo_w_, &logo_h_)) {
|
|
||||||
DEBUG_LOGF("Rendered DragonX SVG logo (%dx%d, accent %08X)\n", logo_w_, logo_h_, logoAccent);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 1) Fallback — theme-override logo from the active skin
|
// 1) theme-override logo from the active skin
|
||||||
const auto* activeSkin = ui::schema::SkinManager::instance().findById(
|
const auto* activeSkin = ui::schema::SkinManager::instance().findById(
|
||||||
ui::schema::SkinManager::instance().activeSkinId());
|
ui::schema::SkinManager::instance().activeSkinId());
|
||||||
std::string logoPath;
|
std::string logoPath;
|
||||||
|
|||||||
Reference in New Issue
Block a user