feat(ux): copy-to-clipboard confirmations + scale wizard buttons for HiDPI
Feedback-convention + HiDPI cleanup (from the audit's living-hygiene threads): - Copy actions that were silent now toast a confirmation: transaction address/txid (context menu, click-to-copy, detail buttons), peer and banned- peer addresses, the Settings data-dir copy, the chat message "Copy", and the key-export result copy. - The first-run wizard's Skip/Back buttons used raw ImVec2(120/80,0) widths that rendered tiny at HiDPI; they now multiply by ui::Layout::dpiScale(). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+7
-5
@@ -3590,7 +3590,7 @@ void App::renderLiteFirstRunPrompt()
|
||||
ImGui::SameLine();
|
||||
if (ui::material::TactileButton(TR("appx_copy"), ImVec2(80 * dp, 0))) copySecretToClipboard(seed);
|
||||
ImGui::SameLine();
|
||||
if (ui::material::TactileButton(skipConfirm ? TR("appx_skip_anyway") : TR("appx_skip"), ImVec2(120, 0))) {
|
||||
if (ui::material::TactileButton(skipConfirm ? TR("appx_skip_anyway") : TR("appx_skip"), ImVec2(120.0f * ui::Layout::dpiScale(), 0))) {
|
||||
if (!skipConfirm) {
|
||||
skipConfirm = true; // require a second, deliberate click
|
||||
} else {
|
||||
@@ -3653,9 +3653,9 @@ void App::renderLiteFirstRunPrompt()
|
||||
}
|
||||
if (!verified) ImGui::EndDisabled();
|
||||
ImGui::SameLine();
|
||||
if (ui::material::TactileButton(TR("appx_back"), ImVec2(80, 0))) { skipConfirm = false; step = 1; }
|
||||
if (ui::material::TactileButton(TR("appx_back"), ImVec2(80.0f * ui::Layout::dpiScale(), 0))) { skipConfirm = false; step = 1; }
|
||||
ImGui::SameLine();
|
||||
if (ui::material::TactileButton(skipConfirm ? TR("appx_skip_anyway") : TR("appx_skip"), ImVec2(120, 0))) {
|
||||
if (ui::material::TactileButton(skipConfirm ? TR("appx_skip_anyway") : TR("appx_skip"), ImVec2(120.0f * ui::Layout::dpiScale(), 0))) {
|
||||
if (!skipConfirm) {
|
||||
skipConfirm = true; // require a second, deliberate click
|
||||
} else {
|
||||
@@ -3752,7 +3752,7 @@ void App::renderLiteFirstRunPrompt()
|
||||
}
|
||||
ImGui::EndDisabled();
|
||||
ImGui::SameLine();
|
||||
if (ui::material::TactileButton(TR("appx_back"), ImVec2(80, 0))) {
|
||||
if (ui::material::TactileButton(TR("appx_back"), ImVec2(80.0f * ui::Layout::dpiScale(), 0))) {
|
||||
sodium_memzero(restoreSeed, sizeof(restoreSeed));
|
||||
restoreErr.clear();
|
||||
step = 0;
|
||||
@@ -4324,8 +4324,10 @@ void App::renderExportKeyDialog()
|
||||
ImGui::TextColored(ImGui::ColorConvertU32ToFloat4(m::OnSurfaceMedium()), "%s", TR("key_export_private_key"));
|
||||
ImGui::InputTextMultiline("##exportresult", export_result_, sizeof(export_result_),
|
||||
ImVec2(-1, 60.0f * dp), ImGuiInputTextFlags_ReadOnly);
|
||||
if (m::TactileButton(TR("copy")))
|
||||
if (m::TactileButton(TR("copy"))) {
|
||||
ImGui::SetClipboardText(export_result_);
|
||||
ui::Notifications::instance().info(TR("copied_to_clipboard"));
|
||||
}
|
||||
} else if (export_error_) {
|
||||
ImGui::Spacing();
|
||||
ImGui::PushTextWrapPos(0.0f);
|
||||
|
||||
Reference in New Issue
Block a user