feat(balance): pending chip in the Donut, Shield and Timeline layouts too

Extends the labeled "Pending +X" chip (with its awaiting-confirmations tooltip)
to three more layouts via a shared DrawPendingChip() helper. It draws on the
ticker line (the USD value sits on the line below in these layouts, so there's no
overlap) and is skipped if it would overflow the card. The remaining draw-list
layouts with right-aligned content (Consolidated, Minimal, the grid variants)
are left for a follow-up.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-10-18 18:27:44 -05:00
co-authored by Claude Opus 4.8
parent e9eeaf00c3
commit 092a802959
3 changed files with 32 additions and 0 deletions
+15
View File
@@ -748,6 +748,11 @@ static void RenderBalanceDonut(App* app) {
dl->AddText(capFont, capFont->LegacySize,
ImVec2(ImGui::GetCursorScreenPos().x, tickerY),
OnSurfaceMedium(), DRAGONX_TICKER);
DrawPendingChip(dl, ImVec2(ImGui::GetCursorScreenPos().x
+ capFont->CalcTextSizeA(capFont->LegacySize, 10000, 0, DRAGONX_TICKER).x
+ Layout::spacingMd(), tickerY),
ImGui::GetCursorScreenPos().x + ImGui::GetContentRegionAvail().x,
capFont, capFont->LegacySize);
ImGui::NewLine();
// USD value
@@ -1663,6 +1668,11 @@ static void RenderBalanceShield(App* app) {
dl->AddText(capFont, capFont->LegacySize,
ImVec2(ImGui::GetCursorScreenPos().x, pos.y + heroSz.y - capFont->LegacySize),
OnSurfaceMedium(), DRAGONX_TICKER);
DrawPendingChip(dl, ImVec2(ImGui::GetCursorScreenPos().x
+ capFont->CalcTextSizeA(capFont->LegacySize, 10000, 0, DRAGONX_TICKER).x
+ Layout::spacingMd(), pos.y + heroSz.y - capFont->LegacySize),
ImGui::GetCursorScreenPos().x + ImGui::GetContentRegionAvail().x,
capFont, capFont->LegacySize);
ImGui::NewLine();
double usd_value = state.getBalanceUSD();
@@ -1852,6 +1862,11 @@ static void RenderBalanceTimeline(App* app) {
dl->AddText(capFont, capFont->LegacySize,
ImVec2(ImGui::GetCursorScreenPos().x, pos.y + heroSz.y - capFont->LegacySize),
OnSurfaceMedium(), DRAGONX_TICKER);
DrawPendingChip(dl, ImVec2(ImGui::GetCursorScreenPos().x
+ capFont->CalcTextSizeA(capFont->LegacySize, 10000, 0, DRAGONX_TICKER).x
+ Layout::spacingMd(), pos.y + heroSz.y - capFont->LegacySize),
ImGui::GetCursorScreenPos().x + ImGui::GetContentRegionAvail().x,
capFont, capFont->LegacySize);
ImGui::NewLine();
double usd_value = state.getBalanceUSD();