fix(ui): theme-aware success green for modal status text
Modal success/status lines (import, backup, seed backup, seed migration) used a hardcoded ImVec4(0.3, 0.8, 0.3) green that ignores the theme — fine on dark, but faint on the light skins, where the audit flagged it as low-contrast. Switch those 8 sites to ui::material::SuccessVec4(), so light themes get their tuned dark green (#3D7A42 etc., readable on white) and dark themes their light green (#81C784). The 2 status-bar mining indicators keep the vivid attention-green. Verified on the sweep: the "already has a seed phrase" / "migration complete" greens are now clearly readable on light, marble, and color-pop-light. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
16
src/app.cpp
16
src/app.cpp
@@ -2788,10 +2788,10 @@ void App::renderImportKeyDialog()
|
||||
if (!keyTrim.empty()) {
|
||||
if (keyRecognized) {
|
||||
ImGui::PushFont(ui::material::Type().iconSmall());
|
||||
ImGui::TextColored(ImVec4(0.3f, 0.8f, 0.3f, 1.0f), ICON_MD_CHECK_CIRCLE);
|
||||
ImGui::TextColored(ui::material::SuccessVec4(), ICON_MD_CHECK_CIRCLE);
|
||||
ImGui::PopFont();
|
||||
ImGui::SameLine(0, 4.0f);
|
||||
ImGui::TextColored(ImVec4(0.3f, 0.8f, 0.3f, 1.0f), "%s",
|
||||
ImGui::TextColored(ui::material::SuccessVec4(), "%s",
|
||||
keyIsZ ? "Shielded spending key" : "Transparent private key");
|
||||
} else {
|
||||
ImGui::PushFont(ui::material::Type().iconSmall());
|
||||
@@ -2806,7 +2806,7 @@ void App::renderImportKeyDialog()
|
||||
|
||||
if (!import_status_.empty()) {
|
||||
if (import_success_) {
|
||||
ImGui::TextColored(ImVec4(0.3f, 0.8f, 0.3f, 1.0f), "%s", import_status_.c_str());
|
||||
ImGui::TextColored(ui::material::SuccessVec4(), "%s", import_status_.c_str());
|
||||
} else {
|
||||
ImGui::TextColored(ImVec4(0.8f, 0.3f, 0.3f, 1.0f), "%s", import_status_.c_str());
|
||||
}
|
||||
@@ -2936,7 +2936,7 @@ void App::renderBackupDialog()
|
||||
|
||||
if (!backup_status_.empty()) {
|
||||
if (backup_success_) {
|
||||
ImGui::TextColored(ImVec4(0.3f, 0.8f, 0.3f, 1.0f), "%s", backup_status_.c_str());
|
||||
ImGui::TextColored(ui::material::SuccessVec4(), "%s", backup_status_.c_str());
|
||||
} else {
|
||||
ImGui::TextColored(ImVec4(0.8f, 0.3f, 0.3f, 1.0f), "%s", backup_status_.c_str());
|
||||
}
|
||||
@@ -3087,7 +3087,7 @@ void App::renderSeedBackupDialog()
|
||||
ui::RenderSeedWordGrid(ui::SplitSeedWords(seed_backup_phrase_));
|
||||
ImGui::Spacing();
|
||||
if (!seed_backup_status_.empty()) {
|
||||
ImGui::TextColored(ImVec4(0.3f, 0.8f, 0.3f, 1.0f), "%s", seed_backup_status_.c_str());
|
||||
ImGui::TextColored(ui::material::SuccessVec4(), "%s", seed_backup_status_.c_str());
|
||||
ImGui::Spacing();
|
||||
}
|
||||
ImGui::Separator();
|
||||
@@ -3176,7 +3176,7 @@ void App::renderSeedMigrationDialog()
|
||||
ImGui::TextColored(kMedium, "%s%s", TR("mig_precheck_checking"), ui::material::LoadingDots());
|
||||
break;
|
||||
case SeedMigrationPrecheck::AlreadyMnemonic:
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.3f, 0.8f, 0.3f, 1.0f));
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, ui::material::SuccessVec4());
|
||||
ImGui::TextWrapped("%s", TR("mig_already_mnemonic"));
|
||||
ImGui::PopStyleColor();
|
||||
ImGui::Spacing(); ImGui::Separator();
|
||||
@@ -3243,7 +3243,7 @@ void App::renderSeedMigrationDialog()
|
||||
seed_migration_status_ = std::string(ok ? TR("seed_backup_saved") : TR("seed_backup_save_failed")) + path;
|
||||
}
|
||||
if (!seed_migration_status_.empty()) {
|
||||
ImGui::TextColored(ImVec4(0.3f, 0.8f, 0.3f, 1.0f), "%s", seed_migration_status_.c_str());
|
||||
ImGui::TextColored(ui::material::SuccessVec4(), "%s", seed_migration_status_.c_str());
|
||||
}
|
||||
ImGui::Spacing();
|
||||
ImGui::Checkbox(TR("mig_backed_up"), &seed_migration_backed_up_);
|
||||
@@ -3397,7 +3397,7 @@ void App::renderSeedMigrationDialog()
|
||||
break;
|
||||
|
||||
case SeedMigrationStep::Done:
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.3f, 0.8f, 0.3f, 1.0f));
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, ui::material::SuccessVec4());
|
||||
ImGui::TextWrapped("%s", TR("mig_done"));
|
||||
ImGui::PopStyleColor();
|
||||
ImGui::Spacing();
|
||||
|
||||
Reference in New Issue
Block a user