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:
@@ -123,7 +123,7 @@ void KeyExportDialog::render(App* app)
|
||||
if (s_fetching) {
|
||||
ImGui::TextColored(material::WarningVec4(), "%s%s", TR("key_export_fetching_base"), material::LoadingDots());
|
||||
} else if (!s_error.empty()) {
|
||||
ImGui::TextColored(ImVec4(1.0f, 0.3f, 0.3f, 1.0f), TR("error_format"), s_error.c_str());
|
||||
ImGui::TextColored(material::ErrorVec4(), TR("error_format"), s_error.c_str());
|
||||
// Not a dead-end: clearing the error falls back through to the Reveal button next frame.
|
||||
ImGui::Spacing();
|
||||
if (material::TactileButton(TR("retry"), ImVec2(revealBtn.width, 0), S.resolveFont(revealBtn.font))) {
|
||||
@@ -132,7 +132,7 @@ void KeyExportDialog::render(App* app)
|
||||
} else if (s_key.empty() && s_address.length() < 26) {
|
||||
// Guard against an empty/blatantly-malformed address before dispatching a doomed reveal.
|
||||
// (Also avoids reading s_address[0] on an empty string in the Reveal branch below.)
|
||||
ImGui::TextColored(ImVec4(1.0f, 0.3f, 0.3f, 1.0f), "%s", TR("invalid_address"));
|
||||
ImGui::TextColored(material::ErrorVec4(), "%s", TR("invalid_address"));
|
||||
} else if (s_key.empty() && app->getWalletState().isLocked()) {
|
||||
// Reveal would just fail with a locked-wallet RPC error — say so and offer to unlock.
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, material::Warning());
|
||||
|
||||
Reference in New Issue
Block a user