From 7826be4b13264e25257312160b4ee0ecde621907 Mon Sep 17 00:00:00 2001 From: DanS Date: Thu, 2 Jul 2026 00:20:30 -0500 Subject: [PATCH] feat(settings): single full-width Node & Security column (no empty gap) Two-column layouts left an unbalanced empty gap for this content (Node/RPC vs Security+Daemon can't be evened into two columns), so drop the split entirely: Node -> RPC -> Security -> Daemon Binary now stack vertically at full card width. This guarantees no horizontal gap and gives the RPC grid and the Daemon Binary button rows the full width they want. Implemented by forcing the existing vertical-flow path (`stacked`) always on, so the section bodies are unchanged; removes the now-unused column-split math and the node-sec-stack-width schema key. Full-node + lite build clean; source hygiene clean. Co-Authored-By: Claude Opus 4.8 (1M context) --- res/themes/ui.toml | 3 --- src/ui/pages/settings_page.cpp | 18 ++++++++---------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/res/themes/ui.toml b/res/themes/ui.toml index 6e1d8f4..e32726f 100644 --- a/res/themes/ui.toml +++ b/res/themes/ui.toml @@ -1325,9 +1325,6 @@ wallet-btn-padding = { size = 24.0 } rpc-label-min-width = { size = 70.0 } rpc-label-width = { size = 85.0 } security-combo-width = { size = 120.0 } -# Node & Security: below this card-content width the NODE + SECURITY columns stack -# vertically (full width each) instead of sitting side by side. -node-sec-stack-width = { size = 600.0 } port-input-min-width = { size = 60.0 } port-input-width-ratio = { size = 0.4 } idle-combo-width = { size = 64.0 } diff --git a/src/ui/pages/settings_page.cpp b/src/ui/pages/settings_page.cpp index 094ad6e..dc629ab 100644 --- a/src/ui/pages/settings_page.cpp +++ b/src/ui/pages/settings_page.cpp @@ -1510,18 +1510,16 @@ void RenderSettingsPage(App* app) { // --- NODE + SECURITY: side by side when wide, stacked when narrow --- { - float colGap = Layout::spacingLg(); - // Responsive: below this content width the two columns get too cramped (the RPC - // grid especially), so stack them into one full-width column instead. - float stackWidth = S.drawElement("components.settings-page", "node-sec-stack-width").sizeOr(600.0f); - bool stacked = contentW < stackWidth; - // Even 50/50 columns so the Daemon Binary section (masonry-placed into the - // shorter column below) has enough width, and Node/RPC vs Security balance. - float leftColW = stacked ? contentW : (contentW - colGap) * 0.5f; - float rightColW = stacked ? contentW : (contentW - colGap) * 0.5f; + // Single full-width column: Node -> RPC -> Security -> Daemon Binary stack + // vertically, each at full card width. (Two-column variants left an unbalanced + // empty gap for this content, and the Daemon Binary button rows want the full + // width anyway.) `stacked` drives the existing vertical-flow path below. + bool stacked = true; + float leftColW = contentW; + float rightColW = contentW; ImVec2 sectionOrigin = ImGui::GetCursorScreenPos(); float leftX = sectionOrigin.x; - float rightX = stacked ? sectionOrigin.x : (sectionOrigin.x + leftColW + colGap); + float rightX = sectionOrigin.x; // ---- LEFT COLUMN: NODE ---- ImGui::SetCursorScreenPos(ImVec2(leftX, sectionOrigin.y));