From 48fc9ba8bb6b15a89ba35c9af3c913b6d7851bc4 Mon Sep 17 00:00:00 2001 From: DanS Date: Wed, 1 Jul 2026 21:06:39 -0500 Subject: [PATCH] fix(settings): clamp About-logo height so it doesn't overlap the buttons MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- src/ui/pages/settings_page.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/ui/pages/settings_page.cpp b/src/ui/pages/settings_page.cpp index c33a8da..8948ff5 100644 --- a/src/ui/pages/settings_page.cpp +++ b/src/ui/pages/settings_page.cpp @@ -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));