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