feat(balance,notifications): shielded-card tooltip + clearer toast severity

- The Shielded balance card gains the explanatory hover tooltip the mining card
  already has (suppressed while the pending-chip tooltip is showing).
- Toasts get a severity-tinted background fill and a slightly thicker accent
  border, so Success/Warning/Error/Info differ by more than hue alone (the
  per-severity leading icon already existed). Tint opacity is a ui.toml token.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-10-18 18:36:55 -05:00
co-authored by Claude Opus 4.8
parent b3e09a3314
commit ee6e99965c
3 changed files with 12 additions and 2 deletions
+3 -1
View File
@@ -526,6 +526,7 @@ static void RenderBalanceClassic(App* app)
}
// Pending badge (top-right corner) — labeled so an unconfirmed "+X" doesn't read as a mystery.
bool pendingChipHovered = false;
if (state.unconfirmed_balance > 0.0) {
snprintf(buf, sizeof(buf), TR("baltab_pending_chip"), state.unconfirmed_balance);
ImVec2 ts = capFont->CalcTextSizeA(
@@ -540,7 +541,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"));
if (material::IsRectHovered(bMin, bMax)) { pendingChipHovered = true; material::Tooltip("%s", TR("baltab_pending_tip")); }
}
// Hover glow + click to Receive
@@ -548,6 +549,7 @@ static void RenderBalanceClassic(App* app)
dl->AddRect(cMin, cMax, IM_COL32(255, 255, 255, (int)S.drawElement("tabs.balance", "hover-glow-alpha").sizeOr(40.0f)),
cardSpec.rounding, 0, S.drawElement("tabs.balance", "hover-glow-thickness").sizeOr(1.5f) * dp);
ImGui::SetMouseCursor(ImGuiMouseCursor_Hand);
if (!pendingChipHovered) material::Tooltip("%s", TR("shielded_card_tooltip"));
if (ImGui::IsMouseClicked(0))
app->setCurrentPage(NavPage::Receive);
}