From 42c511b13a08cb5194787af332ab1ac9c9fdf5c1 Mon Sep 17 00:00:00 2001 From: DanS Date: Fri, 3 Jul 2026 17:59:16 -0500 Subject: [PATCH] fix(market): tighten blank space above interval buttons; pad below the divider - Drop the extra gap the hero header reserved below the price row, so the interval buttons sit closer to the top of the chart area. - Place the divider just below the buttons with a comfortable gap (spacingMd) between it and the plot, instead of centering it in the strip gap. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/ui/windows/market_tab.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/ui/windows/market_tab.cpp b/src/ui/windows/market_tab.cpp index 7ca0c61..0b51420 100644 --- a/src/ui/windows/market_tab.cpp +++ b/src/ui/windows/market_tab.cpp @@ -887,11 +887,11 @@ void RenderMarketTab(App* app) // -- 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(); - // Header now holds only the price row + separator; 24H volume + market cap moved onto the + // Header holds only the price row; 24H volume + market cap and the divider moved onto the // chart's top strip (with the interval buttons) so they no longer create an empty band. float heroHeaderH = Layout::spacingLg() // top pad - + mktH3->LegacySize + Layout::spacingMd() // price row -> separator - + Layout::spacingSm(); // gap below separator, before the chart + + mktH3->LegacySize // price row + + Layout::spacingXs(); // small gap before the chart strip // -- 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). -- @@ -1106,10 +1106,10 @@ void RenderMarketTab(App* app) float chartPad = pad; float pillH = capFont->LegacySize + Layout::spacingXs() * 2.0f; - // Buttons sit near the top of the chart area (minimal gap above), with a comfortable gap - // below before the plot so they aren't crowded against the chart. + // Buttons sit near the top of the chart area; the divider is just below them, with a bit of + // padding below the divider before the plot. float stripTop = chartMin.y + Layout::spacingXs(); - float stripH = pillH + Layout::spacingMd(); + float dividerY = stripTop + pillH + Layout::spacingSm(); // ---- Top strip: interval buttons (left) + 24H volume / market cap + refresh (right) ---- { @@ -1185,16 +1185,15 @@ void RenderMarketTab(App* app) float labelPadBottom = Layout::spacingXl() + Layout::spacingSm(); float plotLeft = chartMin.x + labelPadLeft; float plotRight = chartMax.x - chartPad; - float plotTop = stripTop + stripH; + float plotTop = dividerY + Layout::spacingMd(); // padding below the divider before the plot float plotBottom = chartMax.y - labelPadBottom; float plotW = plotRight - plotLeft; float plotH = plotBottom - plotTop; - // Divider between the interval buttons and the plot (centered in the gap below the strip). + // Divider between the interval buttons and the plot. { - float rnd = glassSpec.rounding; - float divY = (stripTop + pillH + plotTop) * 0.5f; - dl->AddLine(ImVec2(chartMin.x + rnd * 0.5f, divY), ImVec2(chartMax.x - rnd * 0.5f, divY), + float rnd = glassSpec.rounding; + dl->AddLine(ImVec2(chartMin.x + rnd * 0.5f, dividerY), ImVec2(chartMax.x - rnd * 0.5f, dividerY), WithAlpha(OnSurface(), 15), 1.0f * mktDp); }