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

@@ -1508,7 +1508,7 @@ void RenderSettingsPage(App* app) {
TR("lite_servers_network_tab"));
ImGui::Dummy(ImVec2(0, Layout::spacingSm()));
if (ImGui::Button(TrId("lite_wallet_request", "LiteLifecycleToggle").c_str(), ImVec2(liteInputW, 0))) {
if (material::TactileButton(TrId("lite_wallet_request", "LiteLifecycleToggle").c_str(), ImVec2(liteInputW, 0))) {
s_settingsState.lite_lifecycle_expanded = !s_settingsState.lite_lifecycle_expanded;
}
@@ -2696,12 +2696,12 @@ void RenderSettingsPage(App* app) {
ImGui::Spacing();
float btnW = (ImGui::GetContentRegionAvail().x - ImGui::GetStyle().ItemSpacing.x) * 0.5f;
if (ImGui::Button(TrId("cancel", "rescan_cancel").c_str(), ImVec2(btnW, 40))) {
if (material::TactileButton(TrId("cancel", "rescan_cancel").c_str(), ImVec2(btnW, 40))) {
s_settingsState.confirm_rescan = false;
}
ImGui::SameLine();
ImGui::BeginDisabled(detecting);
if (ImGui::Button(TrId("rescan", "rescan_confirm").c_str(), ImVec2(btnW, 40))) {
if (material::TactileButton(TrId("rescan", "rescan_confirm").c_str(), ImVec2(btnW, 40))) {
if (bootstrapped) {
app->runtimeRescan(s_settingsState.rescan_start_height);
} else {

View File

@@ -189,7 +189,7 @@ public:
// "No icon" option
if (showClearIcon) {
ImGui::Spacing();
if (ImGui::SmallButton(TR("clear_icon"))) {
if (material::TactileSmallButton(TR("clear_icon"))) {
s_selectedIcon = -1;
}
}

View File

@@ -119,7 +119,7 @@ public:
// Max button
ImGui::SameLine();
if (ImGui::SmallButton(TR("max"))) {
if (material::TactileSmallButton(TR("max"))) {
snprintf(s_amount, sizeof(s_amount), "%.8f",
maxSendableAmount(s_info.fromBalance, s_fee));
}

View File

@@ -1467,7 +1467,7 @@ void ConsoleTab::renderCommandsPopup()
ImGui::Dummy(ImVec2(0, Layout::spacingXs()));
// Close button
if (ImGui::Button(TR("console_close"), ImVec2(-1, 0))) {
if (material::TactileButton(TR("console_close"), ImVec2(-1, 0))) {
cmdFilter[0] = '\0';
show_commands_popup_ = false;
}

View File

@@ -1043,7 +1043,7 @@ static void renderBlockDetailModal(App* app) {
if (s_detail_height > 1) {
ImGui::PushFont(Type().iconMed());
ImGui::PushID("prevBlock");
if (ImGui::SmallButton(ICON_MD_CHEVRON_LEFT)) {
if (material::TactileSmallButton(ICON_MD_CHEVRON_LEFT)) {
if (app->rpc() && app->rpc()->isConnected())
fetchBlockDetail(app, s_detail_height - 1);
}
@@ -1057,7 +1057,7 @@ static void renderBlockDetailModal(App* app) {
if (!s_detail_next_hash.empty()) {
ImGui::PushFont(Type().iconMed());
ImGui::PushID("nextBlock");
if (ImGui::SmallButton(ICON_MD_CHEVRON_RIGHT)) {
if (material::TactileSmallButton(ICON_MD_CHEVRON_RIGHT)) {
if (app->rpc() && app->rpc()->isConnected())
fetchBlockDetail(app, s_detail_height + 1);
}

View File

@@ -590,9 +590,9 @@ static void pfDrawAddressSection(App* app)
ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding, 12.0f * dp);
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, pillPad);
ImGui::SetCursorScreenPos(ImVec2(grpX, rowStart.y + (rowH - pillH) * 0.5f));
if (ImGui::Button(selLbl)) selAllClicked = true;
if (material::TactileButton(selLbl)) selAllClicked = true;
ImGui::SameLine();
if (ImGui::Button(clrLbl)) s_pfEdit.addrs.clear();
if (material::TactileButton(clrLbl)) s_pfEdit.addrs.clear();
ImGui::PopStyleVar(2);
ImGui::SameLine();
ImGui::SetCursorScreenPos(ImVec2(ImGui::GetCursorScreenPos().x,
@@ -825,7 +825,7 @@ static void RenderPortfolioEditor(App* app)
ImGui::EndChild();
ImGui::Dummy(ImVec2(0, Layout::spacingSm()));
// Add immediately creates a persisted "Untitled" group and selects it for editing.
if (ImGui::Button(TR("portfolio_add_entry"), ImVec2(masterW, addH))) {
if (material::TactileButton(TR("portfolio_add_entry"), ImVec2(masterW, addH))) {
// Adding switches to a new group; uncommitted edits to the current one are discarded.
auto es = settings->getPortfolioEntries();
config::Settings::PortfolioEntry ne;
@@ -952,11 +952,11 @@ static void RenderPortfolioEditor(App* app)
material::RightAlignX(grp);
ImGui::SetCursorPosY(ImGui::GetCursorPosY() + Layout::spacingSm());
ImGui::BeginDisabled(!selDirty);
if (ImGui::Button(TR("portfolio_revert"), ImVec2(bw, addH)))
if (material::TactileButton(TR("portfolio_revert"), ImVec2(bw, addH)))
PortfolioBeginEdit(app, s_pfEdit.sel); // reload the working set from the stored entry
ImGui::SameLine(0, sp);
ImGui::BeginDisabled(s_pfEdit.label[0] == '\0');
if (ImGui::Button(TR("portfolio_save"), ImVec2(bw, addH))) pfCommitIfNeeded(settings);
if (material::TactileButton(TR("portfolio_save"), ImVec2(bw, addH))) pfCommitIfNeeded(settings);
ImGui::EndDisabled();
ImGui::EndDisabled();
}
@@ -967,7 +967,7 @@ static void RenderPortfolioEditor(App* app)
{
float bh = 40.0f * dp, bw = 120.0f * dp;
material::RightAlignX(bw);
if (ImGui::Button(TR("portfolio_close"), ImVec2(bw, bh))) { pfCommitIfNeeded(settings); s_pfEdit.open = false; }
if (material::TactileButton(TR("portfolio_close"), ImVec2(bw, bh))) { pfCommitIfNeeded(settings); s_pfEdit.open = false; }
}
material::EndOverlayDialog();
@@ -1672,7 +1672,7 @@ static void mktDrawPortfolio(const MktCtx& cx)
float mBtnW = body2->CalcTextSizeA(body2->LegacySize, FLT_MAX, 0, ml).x + Layout::spacingMd() * 2;
ImGui::SameLine();
material::RightAlignX(mBtnW);
if (ImGui::Button(ml, ImVec2(mBtnW, 0))) {
if (material::TactileButton(ml, ImVec2(mBtnW, 0))) {
// Open the combined editor selecting the first group (or the empty state if none).
PortfolioBeginEdit(app, app->settings()->getPortfolioEntries().empty() ? -1 : 0);
s_pfEdit.open = true;