refactor(ui): semantic status text uses material tokens instead of hardcoded colors

Finishes the feedback-conventions hygiene thread: ~30 hardcoded ImVec4 green /
red / amber literals used for success / error / warning text now use
material::Success/Error/WarningVec4(), so semantic status colors follow the
active skin and stay legible in every theme (several hardcoded greens/reds read
poorly on the light/pastel skins). Covers validate-address, transaction-details,
key-export, export-all-keys, about, the Settings confirmations/lock state, and
the encryption/decryption dialogs. Brand/logo colors and muted white/grey
(disabled) text are left as-is; dynamic-alpha animated indicators are untouched.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-10-19 08:51:10 -05:00
co-authored by Claude Opus 4.8
parent 8d8e523a26
commit f213878a7c
7 changed files with 47 additions and 47 deletions
@@ -58,16 +58,16 @@ void TransactionDetailsDialog::render(App* app)
ImVec4 type_color;
std::string type_display;
if (tx.type == "receive") {
type_color = ImVec4(0.3f, 0.8f, 0.3f, 1.0f);
type_color = material::SuccessVec4();
type_display = TR("tx_received");
} else if (tx.type == "send") {
type_color = ImVec4(0.8f, 0.3f, 0.3f, 1.0f);
type_color = material::ErrorVec4();
type_display = TR("tx_sent");
} else if (tx.type == "generate" || tx.type == "mined") {
type_color = ImVec4(0.3f, 0.6f, 0.9f, 1.0f);
type_display = TR("tx_mined");
} else if (tx.type == "immature") {
type_color = ImVec4(0.8f, 0.8f, 0.3f, 1.0f);
type_color = material::WarningVec4();
type_display = TR("tx_immature");
} else {
type_color = ImVec4(0.7f, 0.7f, 0.7f, 1.0f);
@@ -79,11 +79,11 @@ void TransactionDetailsDialog::render(App* app)
// Confirmations badge
if (tx.confirmations == 0) {
ImGui::TextColored(ImVec4(0.8f, 0.6f, 0.0f, 1.0f), "%s", TR("pending"));
ImGui::TextColored(material::WarningVec4(), "%s", TR("pending"));
} else if (tx.confirmations < 10) {
ImGui::TextColored(ImVec4(0.8f, 0.8f, 0.3f, 1.0f), TR("tx_confirmations"), tx.confirmations);
ImGui::TextColored(material::WarningVec4(), TR("tx_confirmations"), tx.confirmations);
} else {
ImGui::TextColored(ImVec4(0.3f, 0.8f, 0.3f, 1.0f), TR("tx_confirmations"), tx.confirmations);
ImGui::TextColored(material::SuccessVec4(), TR("tx_confirmations"), tx.confirmations);
}
ImGui::Spacing();
@@ -94,9 +94,9 @@ void TransactionDetailsDialog::render(App* app)
ImGui::Text("%s", TR("amount_label"));
ImGui::SameLine(lbl.position);
if (tx.amount >= 0) {
ImGui::TextColored(ImVec4(0.3f, 0.8f, 0.3f, 1.0f), "+%.8f DRGX", tx.amount);
ImGui::TextColored(material::SuccessVec4(), "+%.8f DRGX", tx.amount);
} else {
ImGui::TextColored(ImVec4(0.8f, 0.3f, 0.3f, 1.0f), "%.8f DRGX", tx.amount);
ImGui::TextColored(material::ErrorVec4(), "%.8f DRGX", tx.amount);
}
// USD equivalent if price available