fix(debug): put screenshot sweep in the renamed DEBUG OPTIONS section
Correct the placement: instead of a new "Debug options" button + dialog (and moving the Verbose logging checkbox), rename the existing collapsible "DEBUG LOGGING" section to "DEBUG OPTIONS" and put the "Run screenshot sweep" button at the top of it, above the dragonxd daemon debug= categories. Restore the Verbose logging checkbox to the wallet row (unchanged). Drop the now-unused debug_options / debug_options_title i18n keys + the debug_options_open flag. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user