fix(market): remove the chart divider between interval buttons and the plot

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-03 18:01:44 -05:00
parent 42c511b13a
commit 3e6987d72f

View File

@@ -1106,10 +1106,8 @@ void RenderMarketTab(App* app)
float chartPad = pad;
float pillH = capFont->LegacySize + Layout::spacingXs() * 2.0f;
// 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.
// Buttons sit near the top of the chart area, with a gap below them before the plot.
float stripTop = chartMin.y + Layout::spacingXs();
float dividerY = stripTop + pillH + Layout::spacingSm();
// ---- Top strip: interval buttons (left) + 24H volume / market cap + refresh (right) ----
{
@@ -1185,18 +1183,11 @@ void RenderMarketTab(App* app)
float labelPadBottom = Layout::spacingXl() + Layout::spacingSm();
float plotLeft = chartMin.x + labelPadLeft;
float plotRight = chartMax.x - chartPad;
float plotTop = dividerY + Layout::spacingMd(); // padding below the divider before the plot
float plotTop = stripTop + pillH + Layout::spacingMd(); // gap below the buttons before the plot
float plotBottom = chartMax.y - labelPadBottom;
float plotW = plotRight - plotLeft;
float plotH = plotBottom - plotTop;
// Divider between the interval buttons and the plot.
{
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);
}
if (s_price_history.size() >= 2) {
// Compute Y range with padding
double yMin = *std::min_element(s_price_history.begin(), s_price_history.end());