diff --git a/src/ui/windows/chat_tab.cpp b/src/ui/windows/chat_tab.cpp index 2b33322..22acc48 100644 --- a/src/ui/windows/chat_tab.cpp +++ b/src/ui/windows/chat_tab.cpp @@ -1859,8 +1859,10 @@ void RenderChatSettingsControls(App* app, float contentWidth) // Right-align controls to the row's true right edge. The Settings tab renders us inside a GlassCard // whose content region isn't narrowed to the card padding, so it passes an explicit contentWidth; // the chat modal's dialog content region is correct, so it passes 0 (auto). - const float leftX = ImGui::GetCursorPosX(); - const float rowW = (contentWidth > 0.0f) ? contentWidth : ImGui::GetContentRegionAvail().x; + // leftX/rowW define the current column the rows lay out in; retargeted below + // to split Appearance | Messaging into two columns when the card is wide. + float leftX = ImGui::GetCursorPosX(); + float rowW = (contentWidth > 0.0f) ? contentWidth : ImGui::GetContentRegionAvail().x; // Label left, control right-aligned within [leftX, leftX+rowW]. Leaves the cursor at the control origin. auto beginRow = [&](const char* label) { @@ -1925,6 +1927,17 @@ void RenderChatSettingsControls(App* app, float contentWidth) return result; }; + // Two internal columns when the card is wide enough: Appearance on the left, + // Messaging on the right — fills the width and roughly halves the height. + // (Mirrors the Node & Security card.) Narrow (the chat modal) stays single-column. + const float chatColGap = 24.0f * dp; + const bool chatTwoCol = rowW > 760.0f * dp; + const float chatColW = chatTwoCol ? (rowW - chatColGap) * 0.5f : rowW; + const float chatBaseLeftX = leftX; + const float chatTopY = ImGui::GetCursorPosY(); + float chatLeftBottomY = 0.0f; + if (chatTwoCol) rowW = chatColW; // left column width + // ── Appearance ──────────────────────────────────────────────────────────────── section("chat_sec_appearance"); // Emoji style (monochrome / color). Color needs a FreeType build (native + the cross-built Windows @@ -1965,6 +1978,15 @@ void RenderChatSettingsControls(App* app, float contentWidth) } } + // Move Messaging into the right column (float it with Indent so every row's + // line-start holds the column; retarget leftX so controls right-align in it). + if (chatTwoCol) { + chatLeftBottomY = ImGui::GetCursorPosY(); + ImGui::SetCursorPosY(chatTopY); + ImGui::Indent(chatColW + chatColGap); + leftX = chatBaseLeftX + chatColW + chatColGap; + } + // ── Messaging ───────────────────────────────────────────────────────────────── section("chat_sec_messaging"); // Message poll rate (full-node 0-conf fast-scan cadence) — slider. @@ -1988,6 +2010,14 @@ void RenderChatSettingsControls(App* app, float contentWidth) bool v = st->getChatEnterSends(); if (ImGui::Checkbox(TR("chat_opt_enter_sends"), &v)) { st->setChatEnterSends(v); st->save(); } } + + // Close the two-column band: un-indent and drop below the taller column. + if (chatTwoCol) { + ImGui::Unindent(chatColW + chatColGap); + const float chatRightBottomY = ImGui::GetCursorPosY(); + ImGui::SetCursorPosX(chatBaseLeftX); + ImGui::SetCursorPosY(std::max(chatLeftBottomY, chatRightBottomY)); + } } } // namespace ui