fix(ui): console-commands modal slide + wallets footer clipping
Two follow-ups to the modal float work: - Console RPC command reference (renderCommandsPopup) had the SAME auto-height feedback bug as Wallets: BlurFloat with no cardHeight, and its fill-height command list read GetContentRegionAvail() inside the AutoResizeY child -> self-referential, sliding content off-screen after a monitor move. Give it a FIXED viewport-relative cardHeight (fills ~84% of the viewport). Also removed its duplicate body H6 heading (the framework h6 title already shows it) — missed earlier because it's spec-form, not the positional overload. - Wallets footer clipping: after the fixed-height conversion the content child clips overflow (NoScrollbar), and the hardcoded 130*dp reserve below the table was too small for the create/add-folder rows + separator + footer (~160*dp), so the buttons clipped — worse at 150%. Compute the reserve from real widget metrics (GetFrameHeightWithSpacing + caption height) so it holds at any DPI. Added a modal-console-commands sweep surface (debug-gated ConsoleTab setter) so the popup is captured. Verified both at 100% and font_scale 1.5 (150%): footers on-screen, single headings, lists fill, nothing clipped. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -69,8 +69,13 @@ public:
|
||||
|
||||
const std::string active = app->settings() ? app->settings()->getActiveWalletFile() : "wallet.dat";
|
||||
|
||||
// Leave room below the table for the add-folder row + footer buttons.
|
||||
float tableH = ImGui::GetContentRegionAvail().y - 130.0f * dp;
|
||||
// Reserve room below the table for the create-wallet + add-folder rows (each a label +
|
||||
// an input row), the separator, and the footer buttons — computed from real widget
|
||||
// metrics so nothing clips at any DPI (a fixed px reserve was too small at 150%).
|
||||
const float rowH = ImGui::GetFrameHeightWithSpacing();
|
||||
const float lblH = Type().caption()->LegacySize + ImGui::GetStyle().ItemSpacing.y;
|
||||
const float belowH = 3.0f * Layout::spacingSm() + 2.0f * lblH + 3.0f * rowH + Layout::spacingMd();
|
||||
float tableH = ImGui::GetContentRegionAvail().y - belowH;
|
||||
if (tableH < 120.0f * dp) tableH = 120.0f * dp;
|
||||
|
||||
const ImGuiTableFlags tflags = ImGuiTableFlags_ScrollY | ImGuiTableFlags_RowBg |
|
||||
|
||||
Reference in New Issue
Block a user