refactor(ui): consolidate raw ImGui buttons onto material::TactileButton

UI-standardization audit: ~66 call sites still used raw ImGui::Button /
ImGui::SmallButton instead of the app's canonical TactileButton, so those
buttons missed the standard glass fill + rim + tactile overlay (and the
light-theme flat treatment). Convert 59 plain action-button sites across the
wizard, security dialogs, settings, market/console/explorer tabs, and the
address dialogs to material::TactileButton / TactileSmallButton (drop-in:
same signature/return, args preserved verbatim). Danger buttons keep their
PushStyleColor wrappers — Tactile renders through them then overlays.

Deliberately left raw (not plain buttons): InvisibleButton hit-targets, the
frameless transparent-bg collapsible-header toggles (RPC/Debug), the icon-only
pagination chevrons, and the receive All/Z/T segmented filter — a glass rim
would clash with those intentionally borderless/segmented looks.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-04 19:00:14 -05:00
parent ad59d62b82
commit da56bb73a0
9 changed files with 59 additions and 59 deletions

View File

@@ -2345,7 +2345,7 @@ void App::renderLiteFirstRunPrompt()
creating = false; // back to the buttons so the user can retry
}
} else {
if (ImGui::Button(TR("lite_welcome_create"), ImVec2(btnW, 0))) {
if (ui::material::TactileButton(TR("lite_welcome_create"), ImVec2(btnW, 0))) {
// Async create with the same server failover as open (no UI freeze; a dead
// server falls through to the next). On success the wizard reveals the seed.
if (lite_wallet_->beginCreateWallet()) {
@@ -2355,11 +2355,11 @@ void App::renderLiteFirstRunPrompt()
}
}
ImGui::SameLine();
if (ImGui::Button(TR("lite_welcome_restore"), ImVec2(btnW, 0))) {
if (ui::material::TactileButton(TR("lite_welcome_restore"), ImVec2(btnW, 0))) {
step = 3; // inline seed-entry restore (see step 3 below)
}
ImGui::Spacing();
if (ImGui::Button(TR("lite_welcome_later"),
if (ui::material::TactileButton(TR("lite_welcome_later"),
ImVec2(btnW * 2 + ImGui::GetStyle().ItemSpacing.x, 0))) {
finish();
}
@@ -2394,7 +2394,7 @@ void App::renderLiteFirstRunPrompt()
ImGui::PopStyleColor();
ImGui::Spacing(); ImGui::Spacing();
if (ImGui::Button("I've written it down", ImVec2(btnW, 0))) {
if (ui::material::TactileButton("I've written it down", ImVec2(btnW, 0))) {
chips.clear();
for (const auto& w : words) chips.emplace_back(w, false);
std::mt19937 rng{std::random_device{}()};
@@ -2403,9 +2403,9 @@ void App::renderLiteFirstRunPrompt()
step = 2;
}
ImGui::SameLine();
if (ImGui::Button("Copy", ImVec2(80, 0))) copySecretToClipboard(seed);
if (ui::material::TactileButton("Copy", ImVec2(80, 0))) copySecretToClipboard(seed);
ImGui::SameLine();
if (ImGui::Button("Skip", ImVec2(80, 0))) {
if (ui::material::TactileButton("Skip", ImVec2(80, 0))) {
ui::Notifications::instance().success(TR("lite_welcome_created"), 6.0f);
finish();
}
@@ -2433,9 +2433,9 @@ void App::renderLiteFirstRunPrompt()
ImGui::PushID((int)i);
if (chips[i].second) {
ImGui::BeginDisabled();
ImGui::Button(chips[i].first.c_str(), ImVec2(125, 0));
ui::material::TactileButton(chips[i].first.c_str(), ImVec2(125, 0));
ImGui::EndDisabled();
} else if (ImGui::Button(chips[i].first.c_str(), ImVec2(125, 0))) {
} else if (ui::material::TactileButton(chips[i].first.c_str(), ImVec2(125, 0))) {
if (progress < (int)words.size() && chips[i].first == words[progress]) {
chips[i].second = true; // correct next word
++progress;
@@ -2450,15 +2450,15 @@ void App::renderLiteFirstRunPrompt()
const bool verified = progress == (int)words.size();
if (!verified) ImGui::BeginDisabled();
if (ImGui::Button("Done", ImVec2(btnW, 0))) {
if (ui::material::TactileButton("Done", ImVec2(btnW, 0))) {
ui::Notifications::instance().success("Wallet created and backed up.", 6.0f);
finish();
}
if (!verified) ImGui::EndDisabled();
ImGui::SameLine();
if (ImGui::Button("Back", ImVec2(80, 0))) step = 1;
if (ui::material::TactileButton("Back", ImVec2(80, 0))) step = 1;
ImGui::SameLine();
if (ImGui::Button("Skip", ImVec2(80, 0))) {
if (ui::material::TactileButton("Skip", ImVec2(80, 0))) {
ui::Notifications::instance().success(TR("lite_welcome_created"), 6.0f);
finish();
}
@@ -2510,7 +2510,7 @@ void App::renderLiteFirstRunPrompt()
while (!seedTrim.empty() && std::isspace((unsigned char)seedTrim.back())) seedTrim.pop_back();
ImGui::BeginDisabled(seedTrim.empty());
if (ImGui::Button(TR("lite_restore_btn"), ImVec2(btnW, 0))) {
if (ui::material::TactileButton(TR("lite_restore_btn"), ImVec2(btnW, 0))) {
wallet::LiteWalletRestoreRequest req;
req.seedPhrase = seedTrim;
req.birthday = static_cast<unsigned long long>(std::max(0, restoreBirthday));
@@ -2526,7 +2526,7 @@ void App::renderLiteFirstRunPrompt()
}
ImGui::EndDisabled();
ImGui::SameLine();
if (ImGui::Button("Back", ImVec2(80, 0))) {
if (ui::material::TactileButton("Back", ImVec2(80, 0))) {
sodium_memzero(restoreSeed, sizeof(restoreSeed));
restoreErr.clear();
step = 0;
@@ -2561,7 +2561,7 @@ void App::renderLiteUnlockPrompt()
ImGuiInputTextFlags_Password | ImGuiInputTextFlags_EnterReturnsTrue);
ImGui::Spacing();
const float btnW = 130.0f;
bool doUnlock = ImGui::Button(TR("lite_unlock_btn"), ImVec2(btnW, 0)) || entered;
bool doUnlock = ui::material::TactileButton(TR("lite_unlock_btn"), ImVec2(btnW, 0)) || entered;
if (doUnlock) {
const bool ok = lite_wallet_->unlockWallet(pass);
sodium_memzero(pass, sizeof(pass));
@@ -2574,7 +2574,7 @@ void App::renderLiteUnlockPrompt()
ImGui::CloseCurrentPopup();
}
ImGui::SameLine();
if (ImGui::Button(TR("cancel"), ImVec2(btnW, 0))) {
if (ui::material::TactileButton(TR("cancel"), ImVec2(btnW, 0))) {
sodium_memzero(pass, sizeof(pass));
lite_unlock_prompt_ = false;
ImGui::CloseCurrentPopup();
@@ -3551,7 +3551,7 @@ void App::renderShutdownScreen()
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0.6f, 0.15f, 0.15f, 0.9f));
ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(0.75f, 0.2f, 0.2f, 1.0f));
ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImVec4(0.5f, 0.1f, 0.1f, 1.0f));
if (ImGui::Button(forceLabel, btnSize)) {
if (ui::material::TactileButton(forceLabel, btnSize)) {
force_quit_confirm_ = true;
}
if (ImGui::IsItemHovered()) {
@@ -3580,7 +3580,7 @@ void App::renderShutdownScreen()
float totalW = btnW * 2 + ImGui::GetStyle().ItemSpacing.x;
ImGui::SetCursorPosX((ImGui::GetWindowWidth() - totalW) * 0.5f);
if (ImGui::Button(TR("cancel"), ImVec2(btnW, 0))) {
if (ui::material::TactileButton(TR("cancel"), ImVec2(btnW, 0))) {
ImGui::CloseCurrentPopup();
}
ImGui::SameLine();
@@ -3588,7 +3588,7 @@ void App::renderShutdownScreen()
ImGui::PushStyleColor(ImGuiCol_Button, ImGui::ColorConvertU32ToFloat4(WithAlpha(Error(), 210)));
ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImGui::ColorConvertU32ToFloat4(Error()));
ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImGui::ColorConvertU32ToFloat4(WithAlpha(Error(), 160)));
if (ImGui::Button(TR("force_quit_yes"), ImVec2(btnW, 0))) {
if (ui::material::TactileButton(TR("force_quit_yes"), ImVec2(btnW, 0))) {
DEBUG_LOGF("Force quit confirmed by user after %.0fs\n", shutdown_timer_);
shutdown_complete_ = true;
ImGui::CloseCurrentPopup();