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) <noreply@anthropic.com>
This commit is contained in:
@@ -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 }
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user