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) <noreply@anthropic.com>
This commit is contained in:
2026-07-02 22:49:09 -05:00
parent 9bcdf51895
commit 1263058ba7

View File

@@ -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). --