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
+3 -2
View File
@@ -525,9 +525,9 @@ static void RenderBalanceClassic(App* app)
WithAlpha(Success(), 160), buf);
}
// Unconfirmed badge (top-right corner)
// Pending badge (top-right corner) — labeled so an unconfirmed "+X" doesn't read as a mystery.
if (state.unconfirmed_balance > 0.0) {
snprintf(buf, sizeof(buf), "+%.4f", state.unconfirmed_balance);
snprintf(buf, sizeof(buf), TR("baltab_pending_chip"), state.unconfirmed_balance);
ImVec2 ts = capFont->CalcTextSizeA(
capFont->LegacySize, 10000, 0, buf);
float bp = S.drawElement("tabs.balance.classic", "unconfirmed-badge-padding").sizeOr(4.0f) * dp;
@@ -540,6 +540,7 @@ static void RenderBalanceClassic(App* app)
dl->AddText(capFont, capFont->LegacySize,
ImVec2(bMin.x + bp, bMin.y + bp * 0.5f),
amberCol, buf);
if (material::IsRectHovered(bMin, bMax)) material::Tooltip("%s", TR("baltab_pending_tip"));
}
// Hover glow + click to Receive