revert(settings): drop the page-level card masonry

Page-level two-column masonry made the cards narrow and fought their internal
layouts. Revert the whole-page band (full-width stacked cards again) and keep
the internal NODE & SECURITY two-column — the better lever is breaking up the
large cards internally, not columning the page. The Explorer row-start-X fix is
kept (correct at full width too).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-21 21:13:37 -05:00
parent de48414c65
commit 07b8e0b2cb

View File

@@ -643,25 +643,6 @@ void RenderSettingsPage(App* app) {
ImFont* body2 = Type().body2(); ImFont* body2 = Type().body2();
ImFont* sub1 = Type().subtitle1(); ImFont* sub1 = Type().subtitle1();
// ====================================================================
// Masonry: a full-width Theme & Language card, then a two-column band
// (Wallet / Node & Security on the left; Explorer / Chat & Contacts on the
// right) when the page is wide enough, then full-width About + Debug below.
// Within the band we shadow `availWidth` to the column width (every card
// reads it) and float the right column with Indent() — a one-shot cursor set
// can't hold a column across line-advances. Each card's own responsive gates
// collapse their internal columns at this narrower width.
// ====================================================================
const float msFullWidth = availWidth;
const float msColGap = Layout::spacingXl();
// Threshold is in logical px (× dpiScale): two columns once each is usable
// (~390 logical wide). Kept low enough to engage under OS display scaling,
// where the panel's real-px width is smaller in logical terms.
const bool msTwoCol = availWidth > 780.0f * Layout::dpiScale();
const float msColW = msTwoCol ? (msFullWidth - msColGap) * 0.5f : msFullWidth;
ImVec2 msColTop(0.0f, 0.0f); // captured when the two-column band begins (below Theme)
float msLeftBottomY = 0.0f;
// ==================================================================== // ====================================================================
// THEME & LANGUAGE — card (draw-first approach; avoids ChannelsSplit // THEME & LANGUAGE — card (draw-first approach; avoids ChannelsSplit
// which breaks BeginCombo popup rendering in some ImGui versions) // which breaks BeginCombo popup rendering in some ImGui versions)
@@ -1318,12 +1299,6 @@ void RenderSettingsPage(App* app) {
ImGui::Dummy(ImVec2(0, gap)); ImGui::Dummy(ImVec2(0, gap));
// Begin the two-column band: Wallet / Node & Security fill the left column.
if (msTwoCol) {
msColTop = ImGui::GetCursorPos();
availWidth = msColW;
}
// ==================================================================== // ====================================================================
// WALLET — card (privacy/daemon toggles + collapsible tools) // WALLET — card (privacy/daemon toggles + collapsible tools)
// ==================================================================== // ====================================================================
@@ -2375,17 +2350,7 @@ void RenderSettingsPage(App* app) {
} }
} }
// End of the left column (Wallet / Node & Security). In two-column mode jump ImGui::Dummy(ImVec2(0, gap));
// back to the band's top and indent so Explorer / Chat fill the right column;
// otherwise just add the usual inter-card gap.
if (msTwoCol) {
msLeftBottomY = ImGui::GetCursorPosY();
ImGui::SetCursorPosY(msColTop.y);
ImGui::Indent(msColW + msColGap);
ImGui::SetCursorPosX(msColTop.x + msColW + msColGap);
} else {
ImGui::Dummy(ImVec2(0, gap));
}
// ==================================================================== // ====================================================================
// EXPLORER & OPTIONS — full-width card // EXPLORER & OPTIONS — full-width card
@@ -2462,15 +2427,6 @@ void RenderSettingsPage(App* app) {
ImGui::PopFont(); ImGui::PopFont();
} }
// End of the two-column band. Un-indent, drop below the taller column, and
// restore full width so About + Debug span the page.
if (msTwoCol) {
ImGui::Unindent(msColW + msColGap);
const float msRightBottomY = ImGui::GetCursorPosY();
ImGui::SetCursorPosX(msColTop.x);
ImGui::SetCursorPosY(std::max(msLeftBottomY, msRightBottomY));
availWidth = msFullWidth;
}
ImGui::Dummy(ImVec2(0, gap)); ImGui::Dummy(ImVec2(0, gap));
// ==================================================================== // ====================================================================