From 1263058ba7d6229791f2c2f2bf0830b87da0a862 Mon Sep 17 00:00:00 2001 From: DanS Date: Thu, 2 Jul 2026 22:49:09 -0500 Subject: [PATCH] fix(market): remove empty band between the stats row and the chart The hero-card header height was derived from an inflated schema value (hero-card-height * vs), reserving far more vertical space than the price row + separator + stats row actually use. Since the chart is drawn at the bottom of that header, it started well below the "24H VOLUME"/"Market Cap" row, leaving an empty band. Size heroHeaderH to the actual content so the chart begins right after the stats. Full-node build clean; ctest 1/1; hygiene clean. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/ui/windows/market_tab.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/ui/windows/market_tab.cpp b/src/ui/windows/market_tab.cpp index bfefb0f..c7f883d 100644 --- a/src/ui/windows/market_tab.cpp +++ b/src/ui/windows/market_tab.cpp @@ -283,11 +283,14 @@ void RenderMarketTab(App* app) // -- Compact price chart: a modest responsive height, no longer stretched to fill the tab. -- float chartH = std::max(110.0f * vs, std::min(chartElem.height * vs, marketAvail.y * 0.22f)); - // -- Hero header (price + stats, excluding the chart) -- - float mktStatsRowH = ovFont->LegacySize + Layout::spacingXs() + sub1->LegacySize + pad; - float heroHeaderH = std::max( - S.drawElement("tabs.market", "hero-card-min-height").size + mktStatsRowH + pad, - (S.drawElement("tabs.market", "hero-card-height").size + mktStatsRowH + pad) * vs); + // -- Hero header: size to the ACTUAL content (price row + separator gap + stats row) so the + // chart starts right after "24H VOLUME"/"Market Cap" instead of below a reserved empty band. -- + ImFont* mktH3 = Type().h3(); + float heroHeaderH = Layout::spacingLg() // top pad + + mktH3->LegacySize + Layout::spacingMd() // price row -> separator + + Layout::spacingSm() // separator -> stats + + ovFont->LegacySize + Layout::spacingXs() + sub1->LegacySize // stats label + value + + Layout::spacingLg(); // bottom pad before the chart // -- Portfolio geometry. No parent card background: the summary floats under the header // and the custom-group cards float below it (each with its own glass background). --