feat(settings): Wallets modal — TactileButton + drop the footer divider

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) <noreply@anthropic.com>
This commit is contained in:
2026-07-13 22:16:25 -05:00
parent a2c4a8df73
commit 067c96c425

View File

@@ -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();
}