diff --git a/src/app.cpp b/src/app.cpp index 448ccea..8f6be17 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -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); diff --git a/src/ui/pages/settings_page.cpp b/src/ui/pages/settings_page.cpp index 181d77f..a830bcc 100644 --- a/src/ui/pages/settings_page.cpp +++ b/src/ui/pages/settings_page.cpp @@ -2331,8 +2331,10 @@ void RenderSettingsPage(App* app) { cs.hoverBg = material::WithAlpha(OnSurface(), 30); cs.tooltip = TR("copy"); const float ih = ImGui::GetFrameHeight(); - if (material::IconButton("##copydir", ICON_MD_CONTENT_COPY, Type().iconSmall(), ImVec2(ih, ih), cs)) + if (material::IconButton("##copydir", ICON_MD_CONTENT_COPY, Type().iconSmall(), ImVec2(ih, ih), cs)) { ImGui::SetClipboardText(dirPath.c_str()); + Notifications::instance().info(TR("copied_to_clipboard")); + } } // Row 2: Wallet size — label left, value RIGHT-aligned. diff --git a/src/ui/windows/chat_tab.cpp b/src/ui/windows/chat_tab.cpp index cabc555..678a8e4 100644 --- a/src/ui/windows/chat_tab.cpp +++ b/src/ui/windows/chat_tab.cpp @@ -1738,7 +1738,10 @@ void RenderChatTab(App* app) } } if (ImGui::BeginPopup("##msgmenu")) { - if (ImGui::MenuItem(TR("copy"))) ImGui::SetClipboardText(m.body.c_str()); + if (ImGui::MenuItem(TR("copy"))) { + ImGui::SetClipboardText(m.body.c_str()); + Notifications::instance().success(TR("copied")); + } ImGui::EndPopup(); } else if (s_msgmenu_index == static_cast(mi)) { s_msgmenu_index = -1; // popup closed diff --git a/src/ui/windows/peers_tab.cpp b/src/ui/windows/peers_tab.cpp index 5aae817..61d4795 100644 --- a/src/ui/windows/peers_tab.cpp +++ b/src/ui/windows/peers_tab.cpp @@ -776,9 +776,11 @@ void RenderPeersTab(App* app) ImGui::Separator(); if (ImGui::MenuItem(TR("copy_address"))) { ImGui::SetClipboardText(peer.addr.c_str()); + ui::Notifications::instance().info(TR("copied_to_clipboard")); } if (ImGui::MenuItem(TR("peers_copy_ip"))) { ImGui::SetClipboardText(ExtractIP(peer.addr).c_str()); + ui::Notifications::instance().info(TR("copied_to_clipboard")); } ImGui::Separator(); if (ImGui::MenuItem(TR("peers_ban_24h"))) { @@ -892,6 +894,7 @@ void RenderPeersTab(App* app) if (effects::ImGuiAcrylic::BeginAcrylicContextItem(nullptr, 0, acrylicTheme2.menu)) { if (ImGui::MenuItem(TR("copy_address"))) { ImGui::SetClipboardText(banned.address.c_str()); + ui::Notifications::instance().info(TR("copied_to_clipboard")); } if (ImGui::MenuItem(TR("peers_unban"))) { app->unbanPeer(banned.address); diff --git a/src/ui/windows/transactions_tab.cpp b/src/ui/windows/transactions_tab.cpp index 6791531..2ef854a 100644 --- a/src/ui/windows/transactions_tab.cpp +++ b/src/ui/windows/transactions_tab.cpp @@ -3,6 +3,7 @@ // Released under the GPLv3 #include "transactions_tab.h" +#include "../notifications.h" #include "transaction_details_dialog.h" #include "export_transactions_dialog.h" #include "transactions_tab_helpers.h" @@ -905,9 +906,11 @@ void RenderTransactionsTab(App* app) if (effects::ImGuiAcrylic::BeginAcrylicContextItem("TxContext", 0, acrylicTheme.menu)) { if (ImGui::MenuItem(TR("copy_address")) && !tx.address.empty()) { ImGui::SetClipboardText(tx.address.c_str()); + Notifications::instance().info(TR("copied_to_clipboard")); } if (ImGui::MenuItem(TR("copy_txid"))) { ImGui::SetClipboardText(tx.txid.c_str()); + Notifications::instance().info(TR("copied_to_clipboard")); } ImGui::Separator(); if (ImGui::MenuItem(TR("view_on_explorer"))) { @@ -950,7 +953,10 @@ void RenderTransactionsTab(App* app) Type().textColored(TypeStyle::Overline, OnSurfaceMedium(), TR("transaction_id")); ImGui::TextWrapped("%s", tx.txid.c_str()); if (ImGui::IsItemHovered()) ImGui::SetMouseCursor(ImGuiMouseCursor_Hand); - if (ImGui::IsItemClicked()) ImGui::SetClipboardText(tx.txid.c_str()); + if (ImGui::IsItemClicked()) { + ImGui::SetClipboardText(tx.txid.c_str()); + Notifications::instance().info(TR("copied_to_clipboard")); + } ImGui::Dummy(ImVec2(0, Layout::spacingSm())); // Memo @@ -972,10 +978,12 @@ void RenderTransactionsTab(App* app) ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding, schema::UI().drawElement("tabs.transactions", "detail-btn-rounding").size); if (TactileSmallButton(TrId("copy_txid", "detail").c_str(), S.resolveFont("button"))) { ImGui::SetClipboardText(tx.txid.c_str()); + Notifications::instance().info(TR("copied_to_clipboard")); } ImGui::SameLine(); if (!tx.address.empty() && TactileSmallButton(TrId("copy_address", "detail").c_str(), S.resolveFont("button"))) { ImGui::SetClipboardText(tx.address.c_str()); + Notifications::instance().info(TR("copied_to_clipboard")); } ImGui::SameLine(); if (TactileSmallButton(TrId("explorer", "detail").c_str(), S.resolveFont("button"))) {