From 0ea423dcea1810df9de347a4fe53fdbb9ef25b70 Mon Sep 17 00:00:00 2001 From: DanS Date: Sat, 4 Jul 2026 13:20:13 -0500 Subject: [PATCH] feat(ui): float the remaining large dialogs (Phase 2 float rollout) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per the user's selection, convert the large multi-section dialogs to the BlurFloat style (floating content on the blur, plain heading, no glass card), each KEEPING its authored width so width-coupled content is untouched: - Export all keys, Console RPC reference, Explorer block detail - Updater dialogs: daemon update, xmrig update, bootstrap download (multi-state) Settings and Address book intentionally kept as cards (the modal Settings *window* is dead code — show_settings_ is never set; the live Settings surface is the nav page, not a modal; Address book has a nested edit that reads better contained). All other confirm/input dialogs stay card-on-blur ("card for small"). Updater dialogs are multi-state — GUI-check each state (confirm/progress/done/failed). Co-Authored-By: Claude Opus 4.8 (1M context) --- src/ui/windows/bootstrap_download_dialog.h | 5 ++++- src/ui/windows/console_tab.cpp | 6 +++++- src/ui/windows/daemon_download_dialog.h | 5 ++++- src/ui/windows/explorer_tab.cpp | 6 +++++- src/ui/windows/export_all_keys_dialog.cpp | 6 +++++- src/ui/windows/xmrig_download_dialog.h | 5 ++++- 6 files changed, 27 insertions(+), 6 deletions(-) diff --git a/src/ui/windows/bootstrap_download_dialog.h b/src/ui/windows/bootstrap_download_dialog.h index b456a78..37775e9 100644 --- a/src/ui/windows/bootstrap_download_dialog.h +++ b/src/ui/windows/bootstrap_download_dialog.h @@ -53,7 +53,10 @@ public: using namespace material; const float dp = Layout::dpiScale(); - if (BeginOverlayDialog(TR("download_bootstrap"), &s_open, 500.0f, 0.94f)) { + OverlayDialogSpec ov; + ov.title = TR("download_bootstrap"); ov.p_open = &s_open; + ov.style = OverlayStyle::BlurFloat; ov.cardWidth = 500.0f; ov.cardBottomViewportRatio = 0.94f; + if (BeginOverlayDialog(ov)) { if (s_state == State::Confirm) { renderConfirm(dp); diff --git a/src/ui/windows/console_tab.cpp b/src/ui/windows/console_tab.cpp index f1955dc..9b5716a 100644 --- a/src/ui/windows/console_tab.cpp +++ b/src/ui/windows/console_tab.cpp @@ -1341,7 +1341,11 @@ void ConsoleTab::renderCommandsPopup() using namespace material; float popW = std::min(schema::UI().drawElement("tabs.console", "popup-max-width").size, ImGui::GetMainViewport()->Size.x * schema::UI().drawElement("tabs.console", "popup-width-ratio").size); - if (!material::BeginOverlayDialog(TR("console_rpc_reference"), &show_commands_popup_, popW, 0.94f)) { + material::OverlayDialogSpec ov; + ov.title = TR("console_rpc_reference"); ov.p_open = &show_commands_popup_; + ov.style = material::OverlayStyle::BlurFloat; // floating content on the blur, plain heading + ov.cardWidth = popW; ov.cardBottomViewportRatio = 0.94f; // keep authored width + if (!material::BeginOverlayDialog(ov)) { return; } diff --git a/src/ui/windows/daemon_download_dialog.h b/src/ui/windows/daemon_download_dialog.h index cd19480..04bab0b 100644 --- a/src/ui/windows/daemon_download_dialog.h +++ b/src/ui/windows/daemon_download_dialog.h @@ -62,7 +62,10 @@ public: } using namespace material; const float dp = Layout::dpiScale(); - if (BeginOverlayDialog(TR("daemon_update_title"), &s_open, 480.0f, 0.94f)) { + OverlayDialogSpec ov; + ov.title = TR("daemon_update_title"); ov.p_open = &s_open; + ov.style = OverlayStyle::BlurFloat; ov.cardWidth = 480.0f; ov.cardBottomViewportRatio = 0.94f; + if (BeginOverlayDialog(ov)) { const auto p = s_updater->getProgress(); using St = util::DaemonUpdater::State; switch (p.state) { diff --git a/src/ui/windows/explorer_tab.cpp b/src/ui/windows/explorer_tab.cpp index f6594cd..41790b9 100644 --- a/src/ui/windows/explorer_tab.cpp +++ b/src/ui/windows/explorer_tab.cpp @@ -1024,7 +1024,11 @@ static void renderBlockDetailModal(App* app) { return; } - if (!BeginOverlayDialog(TR("explorer_block_detail"), &s_show_detail_modal, modalW, 0.90f)) + OverlayDialogSpec ov; + ov.title = TR("explorer_block_detail"); ov.p_open = &s_show_detail_modal; + ov.style = OverlayStyle::BlurFloat; // floating content on the blur, plain heading + ov.cardWidth = modalW; ov.cardBottomViewportRatio = 0.90f; // keep authored width + if (!BeginOverlayDialog(ov)) return; float contentW = ImGui::GetContentRegionAvail().x; diff --git a/src/ui/windows/export_all_keys_dialog.cpp b/src/ui/windows/export_all_keys_dialog.cpp index aa72dac..bc10a32 100644 --- a/src/ui/windows/export_all_keys_dialog.cpp +++ b/src/ui/windows/export_all_keys_dialog.cpp @@ -69,7 +69,11 @@ void ExportAllKeysDialog::render(App* app) auto exportBtn = S.button("dialogs.export-all-keys", "export-button"); auto closeBtn = S.button("dialogs.export-all-keys", "close-button"); - if (material::BeginOverlayDialog(TR("export_keys_title"), &s_open, win.width, 0.94f)) { + material::OverlayDialogSpec ov; + ov.title = TR("export_keys_title"); ov.p_open = &s_open; + ov.style = material::OverlayStyle::BlurFloat; // floating content on the blur, plain heading + ov.cardWidth = win.width; ov.cardBottomViewportRatio = 0.94f; // keep authored width + if (material::BeginOverlayDialog(ov)) { // Warning ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(1.0f, 0.4f, 0.4f, 1.0f)); ImGui::PushFont(material::Type().iconSmall()); diff --git a/src/ui/windows/xmrig_download_dialog.h b/src/ui/windows/xmrig_download_dialog.h index e9c8cdd..73d3ca9 100644 --- a/src/ui/windows/xmrig_download_dialog.h +++ b/src/ui/windows/xmrig_download_dialog.h @@ -51,7 +51,10 @@ public: } using namespace material; const float dp = Layout::dpiScale(); - if (BeginOverlayDialog(TR("xmrig_update_title"), &s_open, 480.0f, 0.94f)) { + OverlayDialogSpec ov; + ov.title = TR("xmrig_update_title"); ov.p_open = &s_open; + ov.style = OverlayStyle::BlurFloat; ov.cardWidth = 480.0f; ov.cardBottomViewportRatio = 0.94f; + if (BeginOverlayDialog(ov)) { const auto p = s_updater->getProgress(); using St = util::XmrigUpdater::State; switch (p.state) {