From 067c96c42593018ec94d38113ef35d182637addf Mon Sep 17 00:00:00 2001 From: DanS Date: Mon, 13 Jul 2026 22:16:25 -0500 Subject: [PATCH] =?UTF-8?q?feat(settings):=20Wallets=20modal=20=E2=80=94?= =?UTF-8?q?=20TactileButton=20+=20drop=20the=20footer=20divider?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Phase 1. Swap the 5 StyledButton actions (Open / Create / Scan folder / Reveal / Close) to TactileButton, and remove the ImGui::Separator above the footer (the reference has no divider). Already struct-form + fully i18n'd. Deferred: R6 glass-panel grouping of the scanned-folders section (it interacts with the dialog's pre-computed cardHeight — a separate, more careful change). Co-Authored-By: Claude Opus 4.8 (1M context) --- src/ui/windows/wallets_dialog.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/ui/windows/wallets_dialog.h b/src/ui/windows/wallets_dialog.h index 1cac7d9..90e8bde 100644 --- a/src/ui/windows/wallets_dialog.h +++ b/src/ui/windows/wallets_dialog.h @@ -371,7 +371,7 @@ public: dl->AddText(metaFont, metaFont->LegacySize, ImVec2(cp.x + 8.0f * dp, cp.y + 3.0f * dp), Success(), al); } else { ImGui::SetCursorScreenPos(ImVec2(btnX, midY - btnH * 0.5f)); - if (StyledButton(TR("wallets_open"), ImVec2(btnW, btnH))) { + if (TactileButton(TR("wallets_open"), ImVec2(btnW, btnH))) { if (r.inDatadir) { app->switchToWallet(r.fileName); s_open = false; } else { openInPlace(app, r); } } @@ -419,7 +419,7 @@ public: ImGui::SetNextItemWidth(listW - createBtnW - style.ItemSpacing.x); ImGui::InputTextWithHint("##newWalletName", TR("wallets_new_hint"), s_newName, sizeof(s_newName)); ImGui::SameLine(); - if (StyledButton(TR("wallets_create"), ImVec2(createBtnW, 0))) { + if (TactileButton(TR("wallets_create"), ImVec2(createBtnW, 0))) { std::string name = normalizeWalletName(s_newName); std::error_code ec; if (name.empty() || isLinkName(name)) { // reserve the in-place-link prefix @@ -439,7 +439,7 @@ public: // ---- Scan another folder — always visible, full-width, opens the in-app folder picker - // Start in the DRAGONX data directory (where the datadir wallets live) so the user can // navigate up/out from a familiar anchor to find wallets in other folders. - if (StyledButton(TR("wallets_scan_folder"), ImVec2(listW, 0))) { + if (TactileButton(TR("wallets_scan_folder"), ImVec2(listW, 0))) { FolderPicker::open(util::Platform::getDragonXDataDir(), [app](const std::string& dir) { std::error_code ec; if (!dir.empty() && std::filesystem::is_directory(dir, ec)) { @@ -497,7 +497,6 @@ public: } ImGui::Dummy(ImVec2(0, Layout::spacingSm())); - ImGui::Separator(); // ---- Refresh: icon-only, de-emphasized next to the text actions ----------------------- { float bh = ImGui::GetFrameHeight(); @@ -510,10 +509,10 @@ public: s_needScan = true; } ImGui::SameLine(); - if (StyledButton(TR("wallets_reveal"), ImVec2(150.0f * dp, 0))) + if (TactileButton(TR("wallets_reveal"), ImVec2(150.0f * dp, 0))) util::Platform::openFolder(util::Platform::getDragonXDataDir()); ImGui::SameLine(); - if (StyledButton(TR("close"), ImVec2(110.0f * dp, 0))) s_open = false; + if (TactileButton(TR("close"), ImVec2(110.0f * dp, 0))) s_open = false; EndOverlayDialog(); }