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:
@@ -1547,7 +1547,7 @@ void App::renderEncryptWalletDialog() {
|
||||
}
|
||||
|
||||
if (!encrypt_status_.empty()) {
|
||||
ImGui::TextColored(ImVec4(1, 0.7f, 0, 1), "%s", encrypt_status_.c_str());
|
||||
ImGui::TextColored(ui::material::WarningVec4(), "%s", encrypt_status_.c_str());
|
||||
}
|
||||
|
||||
ImGui::Spacing();
|
||||
@@ -1558,7 +1558,7 @@ void App::renderEncryptWalletDialog() {
|
||||
if (!valid && (encPassLen > 0 || strlen(encrypt_confirm_buf_) > 0)) {
|
||||
const char* why = (encPassLen < 8) ? TR("enc_min_len")
|
||||
: (!encMatch ? TR("enc_mismatch") : "");
|
||||
if (*why) ImGui::TextColored(ImVec4(1.0f, 0.7f, 0.3f, 1.0f), "%s", why);
|
||||
if (*why) ImGui::TextColored(ui::material::WarningVec4(), "%s", why);
|
||||
}
|
||||
|
||||
float btnW = (ImGui::GetContentRegionAvail().x - ImGui::GetStyle().ItemSpacing.x) * 0.5f;
|
||||
@@ -1642,7 +1642,7 @@ void App::renderEncryptWalletDialog() {
|
||||
ImGui::PopItemWidth();
|
||||
|
||||
if (!enc_dlg_pin_status_.empty()) {
|
||||
ImGui::TextColored(ImVec4(1, 0.7f, 0, 1), "%s", enc_dlg_pin_status_.c_str());
|
||||
ImGui::TextColored(ui::material::WarningVec4(), "%s", enc_dlg_pin_status_.c_str());
|
||||
}
|
||||
|
||||
ImGui::Spacing();
|
||||
@@ -1760,7 +1760,7 @@ void App::renderEncryptWalletDialog() {
|
||||
ImGui::PopItemWidth();
|
||||
|
||||
if (!encrypt_status_.empty()) {
|
||||
ImGui::TextColored(ImVec4(1, 0.7f, 0, 1), "%s", encrypt_status_.c_str());
|
||||
ImGui::TextColored(ui::material::WarningVec4(), "%s", encrypt_status_.c_str());
|
||||
}
|
||||
|
||||
ImGui::Spacing();
|
||||
@@ -1841,7 +1841,7 @@ void App::renderDecryptWalletDialog() {
|
||||
ImGui::PopItemWidth();
|
||||
|
||||
if (!decryptState.status.empty()) {
|
||||
ImGui::TextColored(ImVec4(1, 0.4f, 0.4f, 1), "%s", decryptState.status.c_str());
|
||||
ImGui::TextColored(ui::material::ErrorVec4(), "%s", decryptState.status.c_str());
|
||||
}
|
||||
|
||||
ImGui::Spacing();
|
||||
@@ -2089,7 +2089,7 @@ void App::renderDecryptWalletDialog() {
|
||||
if (services::WalletSecurityWorkflow::stepIsComplete(decryptState.step,
|
||||
services::WalletSecurityWorkflow::stepFromIndex(i))) {
|
||||
// Completed
|
||||
ImGui::TextColored(ImVec4(0.3f, 0.9f, 0.4f, 1.0f), ICON_MD_CHECK_CIRCLE);
|
||||
ImGui::TextColored(ui::material::SuccessVec4(), ICON_MD_CHECK_CIRCLE);
|
||||
} else if (i == services::WalletSecurityWorkflow::stepIndex(decryptState.step)) {
|
||||
// In progress - animate
|
||||
float alpha = 0.5f + 0.5f * sinf((float)ImGui::GetTime() * 4.0f);
|
||||
@@ -2248,7 +2248,7 @@ void App::renderPinDialogs() {
|
||||
ImGui::PopItemWidth();
|
||||
|
||||
if (!pin_status_.empty()) {
|
||||
ImGui::TextColored(ImVec4(1, 0.7f, 0, 1), "%s", pin_status_.c_str());
|
||||
ImGui::TextColored(ui::material::WarningVec4(), "%s", pin_status_.c_str());
|
||||
}
|
||||
|
||||
ImGui::Spacing();
|
||||
@@ -2378,7 +2378,7 @@ void App::renderPinDialogs() {
|
||||
ImGui::PopItemWidth();
|
||||
|
||||
if (!pin_status_.empty()) {
|
||||
ImGui::TextColored(ImVec4(1, 0.7f, 0, 1), "%s", pin_status_.c_str());
|
||||
ImGui::TextColored(ui::material::WarningVec4(), "%s", pin_status_.c_str());
|
||||
}
|
||||
|
||||
ImGui::Spacing();
|
||||
@@ -2447,7 +2447,7 @@ void App::renderPinDialogs() {
|
||||
ImGui::PopItemWidth();
|
||||
|
||||
if (!pin_status_.empty()) {
|
||||
ImGui::TextColored(ImVec4(1, 0.7f, 0, 1), "%s", pin_status_.c_str());
|
||||
ImGui::TextColored(ui::material::WarningVec4(), "%s", pin_status_.c_str());
|
||||
}
|
||||
|
||||
ImGui::Spacing();
|
||||
|
||||
Reference in New Issue
Block a user