fix(settings): clamp About-logo height so it doesn't overlap the buttons

The About card draws its logo deferred in the left column, scaled to the card
height (cardMax.y - bottomPad). Because the buttons row is full-width at the
bottom of the card, the tall logo extended down over it. Clamp the logo to end
just above the buttons row (captured Y minus a small gap) instead of the card
bottom — aspect + reserved-width caps are unchanged.

Full-node + lite build clean; source hygiene clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-01 21:06:39 -05:00
parent 2552234610
commit 48fc9ba8bb

View File

@@ -2465,6 +2465,10 @@ void RenderSettingsPage(App* app) {
ImGui::Dummy(ImVec2(0, Layout::spacingMd()));
// Top of the (full-width) buttons row — the deferred logo is clamped to end above
// this Y so the tall left-column logo never overlaps the buttons.
float aboutButtonsTopY = ImGui::GetCursorScreenPos().y;
// Buttons — consistent equal-width row (full card width)
if (logoAreaW > 0) {
ImGui::Unindent(logoAreaW);
@@ -2503,12 +2507,14 @@ void RenderSettingsPage(App* app) {
ImVec2 cardMax(cardMin.x + availWidth, ImGui::GetCursorScreenPos().y);
// Draw the logo now that the card height is known — scaled to the card height
// (inset by padding), aspect-preserved, and capped to the reserved width so it
// never overlaps the text. Still on the content channel (1), above the glass.
// Draw the logo now that the card height is known — aspect-preserved, capped to the
// reserved width, and clamped to end just above the buttons row so it never overlaps
// the text or the buttons. Still on the content channel (1), above the glass.
if (logoTex != 0) {
float reserveW = logoReserveH * logoAspect;
float logoH = std::max(16.0f, (cardMax.y - logoPos.y) - bottomPad);
// Height available above the buttons row (the fix for the logo/buttons overlap).
float logoBottomLimit = aboutButtonsTopY - Layout::spacingSm();
float logoH = std::max(16.0f, logoBottomLimit - logoPos.y);
float logoW = logoH * logoAspect;
if (logoW > reserveW) { logoW = reserveW; logoH = (logoAspect > 0.0f) ? logoW / logoAspect : logoH; }
dl->AddImage(logoTex, logoPos, ImVec2(logoPos.x + logoW, logoPos.y + logoH));