diff --git a/src/ui/pages/settings_page.cpp b/src/ui/pages/settings_page.cpp index 39c2e2c..85da49b 100644 --- a/src/ui/pages/settings_page.cpp +++ b/src/ui/pages/settings_page.cpp @@ -150,7 +150,6 @@ struct SettingsPageState { bool confirm_clear_ztx = false; bool confirm_delete_blockchain = false; bool confirm_rescan = false; - bool debug_options_open = false; // Rescan dialog: probe the node's available block range so a bootstrapped/pruned node gets a // runtime rescan from a snapshot-available height instead of the (failing) -rescan-from-genesis. bool rescan_height_detecting = false; @@ -1187,7 +1186,7 @@ void RenderSettingsPage(App* app) { totalW += cbW(TR("keep_daemon")) + cbSpacing + cbW(TR("stop_external")) + cbSpacing; } - // (Verbose logging moved into the Debug options dialog below.) + totalW += cbW(TR("verbose_logging")); float scale = (totalW > contentW) ? contentW / totalW : 1.0f; if (scale < 1.0f) ImGui::SetWindowFontScale(scale); float sp = cbSpacing * scale; @@ -1214,18 +1213,19 @@ void RenderSettingsPage(App* app) { if (ImGui::IsItemHovered()) material::Tooltip("%s", TR("tt_stop_external")); } + ImGui::SameLine(0, sp); + if (ImGui::Checkbox(TrId("verbose_logging", "verbose").c_str(), &s_settingsState.verbose_logging)) { + dragonx::util::Logger::instance().setVerbose(s_settingsState.verbose_logging); + saveSettingsPageState(app->settings()); + } + if (ImGui::IsItemHovered()) + material::Tooltip("%s", TR("tt_verbose")); if (scale < 1.0f) ImGui::SetWindowFontScale(1.0f); } ImGui::Dummy(ImVec2(0, Layout::spacingSm())); - // Debug options — a button that opens a small dialog (verbose logging + screenshot sweep). - if (TactileButton(TR("debug_options"), ImVec2(0, 0), S.resolveFont("button"))) - s_settingsState.debug_options_open = true; - - ImGui::Dummy(ImVec2(0, Layout::spacingSm())); - // --- Collapsible: Tools & Actions... --- material::CollapsibleHeader(dl, "##ToolsToggle", TR("tools_actions"), s_settingsState.tools_expanded, contentW, @@ -2425,7 +2425,7 @@ void RenderSettingsPage(App* app) { ImGui::Dummy(ImVec2(0, gap)); // ==================================================================== - // DEBUG LOGGING — collapsible card (full-node only: these are dragonxd + // DEBUG OPTIONS — collapsible card (full-node only: holds the screenshot sweep + the dragonxd // daemon debug= categories written to DRAGONX.conf; lite has no daemon) // ==================================================================== if (app->supportsFullNodeLifecycleActions()) { @@ -2458,6 +2458,15 @@ void RenderSettingsPage(App* app) { material::GlassCardScope card(dl, availWidth, pad, bottomPad, glassSpec); + // Screenshot sweep — capture every theme x every tab (above the daemon debug categories). + ImGui::TextWrapped("%s", TR("screenshot_sweep_desc")); + ImGui::Dummy(ImVec2(0, Layout::spacingXs())); + if (TactileButton(TR("screenshot_sweep"), ImVec2(0, 0), S.resolveFont("button"))) + app->startScreenshotSweep(); + ImGui::Dummy(ImVec2(0, Layout::spacingSm())); + ImGui::Separator(); + ImGui::Dummy(ImVec2(0, Layout::spacingSm())); + ImGui::TextColored(ImVec4(1,1,1,0.5f), "%s", TR("settings_debug_select")); ImGui::TextColored(ImVec4(1,1,1,0.35f), "%s", TR("settings_debug_restart_note")); ImGui::Dummy(ImVec2(0, Layout::spacingSm())); @@ -2580,26 +2589,6 @@ void RenderSettingsPage(App* app) { ImGui::EndChild(); // ##SettingsPageScroll - // Debug options dialog — verbose logging toggle + the theme/tab screenshot sweep. - if (s_settingsState.debug_options_open) { - if (BeginOverlayDialog(TR("debug_options_title"), &s_settingsState.debug_options_open, 460.0f, 0.94f)) { - if (ImGui::Checkbox(TrId("verbose_logging", "dbg_verbose").c_str(), &s_settingsState.verbose_logging)) { - dragonx::util::Logger::instance().setVerbose(s_settingsState.verbose_logging); - saveSettingsPageState(app->settings()); - } - if (ImGui::IsItemHovered()) material::Tooltip("%s", TR("tt_verbose")); - - ImGui::Dummy(ImVec2(0, Layout::spacingSm())); - ImGui::TextWrapped("%s", TR("screenshot_sweep_desc")); - ImGui::Dummy(ImVec2(0, Layout::spacingXs())); - if (TactileButton(TR("screenshot_sweep"), ImVec2(0, 0), S.resolveFont("button"))) { - app->startScreenshotSweep(); - s_settingsState.debug_options_open = false; - } - EndOverlayDialog(); - } - } - // Confirmation dialog for clearing z-tx history if (s_settingsState.confirm_clear_ztx) { if (BeginOverlayDialog(TR("confirm_clear_ztx_title"), &s_settingsState.confirm_clear_ztx, 480.0f, 0.94f)) { diff --git a/src/util/i18n.cpp b/src/util/i18n.cpp index f480c59..b86ab41 100644 --- a/src/util/i18n.cpp +++ b/src/util/i18n.cpp @@ -253,8 +253,6 @@ void I18n::loadBuiltinEnglish() strings_["keep_daemon"] = "Keep daemon running"; strings_["stop_external"] = "Stop external daemon"; strings_["verbose_logging"] = "Verbose logging"; - strings_["debug_options"] = "Debug options\xE2\x80\xA6"; - strings_["debug_options_title"] = "Debug options"; strings_["screenshot_sweep"] = "Run screenshot sweep"; strings_["screenshot_sweep_desc"] = "Cycles every theme across every tab and saves a screenshot of each to a timestamped folder in the config directory. Runs for a few seconds; the path is shown when it finishes."; strings_["mine_when_idle"] = "Mine when idle"; @@ -530,7 +528,7 @@ void I18n::loadBuiltinEnglish() // Settings: about / debug strings_["settings_about_text"] = "A shielded cryptocurrency wallet for DragonX (DRGX), built with Dear ImGui for a lightweight, portable experience."; strings_["settings_copyright"] = "Copyright 2024-2026 DragonX Developers | GPLv3 License"; - strings_["debug_logging"] = "DEBUG LOGGING"; + strings_["debug_logging"] = "DEBUG OPTIONS"; strings_["settings_debug_select"] = "Select categories to enable daemon debug logging (-debug= flags)."; strings_["settings_debug_restart_note"] = "Changes take effect after restarting the daemon.";