fix(console): RPC command-reference modal audit fixes

- Clicking a command now actually closes the modal. It called
  ImGui::CloseCurrentPopup(), a no-op here (BeginOverlayDialog is Begin/
  BeginChild, not an ImGui popup), so the picker stayed open covering the input
  and the insert looked like it did nothing. Set show_commands_popup_=false.
- Search filter is now a member cleared when the modal opens, so it isn't stale
  on reopen after an outside-click / command-click dismiss (was reset only by
  the Close button).
- Esc dismisses the modal (this overlay has no built-in Esc handling), and the
  search box auto-focuses on open so the user can type immediately.
- Scale the 2-vs-3 column breakpoint (cmd-min-width) by dpiScale() — it was a
  logical-px threshold compared against a physical-px available width.
- Give each category's table a unique ImGui id (##cmdsN) instead of sharing
  "##cmds", and translate the 7 category names (Control/Network/... — command
  descriptions stay English) into all 8 languages; CJK subset rebuilt (+2).

(Investigated but rejected: the command-name blue was flagged as low-contrast
on light skins, but the modal card is a dark glass panel on every theme, so the
original color is correct — verified by rendering marble/light/color-pop-light.)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-12 19:25:51 -05:00
parent 675d434958
commit ab4dd370c0
12 changed files with 103 additions and 11 deletions

View File

@@ -1294,6 +1294,13 @@ void I18n::loadBuiltinEnglish()
strings_["console_toggle_text_color"] = "Toggle line text colors";
strings_["console_accents"] = "Color accents";
strings_["console_text_colors"] = "Text colors";
strings_["console_cat_control"] = "Control";
strings_["console_cat_network"] = "Network";
strings_["console_cat_blockchain"] = "Blockchain";
strings_["console_cat_mining"] = "Mining";
strings_["console_cat_wallet"] = "Wallet";
strings_["console_cat_raw_transactions"] = "Raw Transactions";
strings_["console_cat_utility"] = "Utility";
// --- Export All Keys Dialog ---
strings_["export_keys_btn"] = "Export Keys";