feat(balance): labeled "Pending +X" chip with tooltip in more layouts

The unconfirmed balance was shown in only one layout as an unlabeled "+X" that
read as a mystery. It's now a labeled "Pending +X" chip with an "awaiting
confirmations" tooltip — the Classic card's badge is relabeled, and the shared
compact hero (Dashboard + Two-row layouts) now draws it too. (The remaining
hand-drawn layouts can reuse the same pattern as a follow-up.)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-10-18 13:07:43 -05:00
co-authored by Claude Opus 4.8
parent 7cea9b7339
commit bcfc324426
3 changed files with 17 additions and 2 deletions
+12
View File
@@ -136,6 +136,18 @@ void RenderCompactHero(App* app, ImDrawList* dl, float availW, float hs, float v
ImGui::Dummy(ImVec2(capFont->CalcTextSizeA(tickerFontSize, 10000, 0, DRAGONX_TICKER).x + Layout::spacingLg(), lineH));
ImGui::SameLine();
// Pending (unconfirmed) chip — so these layouts show it too, labeled, not just the Classic card.
if (s_dispUnconfirmed > 1e-9) {
snprintf(buf, sizeof(buf), TR("baltab_pending_chip"), s_dispUnconfirmed);
ImVec2 pp = ImGui::GetCursorScreenPos();
dl->AddText(capFont, tickerFontSize, ImVec2(pp.x, tickerY), WithAlpha(Warning(), 230), buf);
float pw = capFont->CalcTextSizeA(tickerFontSize, 10000, 0, buf).x;
if (material::IsRectHovered(ImVec2(pp.x, tickerY), ImVec2(pp.x + pw, tickerY + tickerFontSize)))
material::Tooltip("%s", TR("baltab_pending_tip"));
ImGui::Dummy(ImVec2(pw + Layout::spacingLg(), lineH));
ImGui::SameLine();
}
// Total period-earnings (left of the USD) when the global earnings toggle is on.
{
std::string earnText; ImU32 earnCol;