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

@@ -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;