fix(client/windows): render the settings category title in the content column

NavigationView.Header carries WinUI's own left inset -- the reactor exposes
it as a string prop, so the template's padding is not ours to move, and the
title sat visibly right of the cards beneath it. Render the title as the
first element of the content column instead, where it shares the cards'
left edge by construction.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-19 17:39:12 +02:00
parent 344618e1f0
commit 67d2964db9
+15 -2
View File
@@ -676,8 +676,22 @@ pub(crate) fn settings_page(
// section-switch entrance: fade + slide-up from the root-driven tween.
// No max-width cap here (unlike the other pages): the NavigationView already spends the
// left third on its pane, so a 640-wide column left the cards as a narrow ribbon.
// The category title is rendered HERE, not via NavigationView's Header: that header's
// left inset belongs to WinUI's own template (a string prop is all we can set), so it
// sat noticeably right of the cards under it. In the content column it shares the cards'
// left edge by construction.
let titled: Vec<Element> = std::iter::once(
text_block(title)
.font_size(28.0)
.semibold()
.horizontal_alignment(HorizontalAlignment::Left)
.margin(edges(0.0, 0.0, 0.0, 6.0))
.into(),
)
.chain(groups)
.collect();
let content = scroll_view(
vstack(groups)
vstack(titled)
.spacing(10.0)
.margin(edges(24.0, 20.0, 28.0, 40.0))
.with_key(section),
@@ -686,7 +700,6 @@ pub(crate) fn settings_page(
.margin(edges(0.0, (1.0 - progress) * 22.0, 0.0, 0.0));
NavigationView::new(items, content)
.pane_title("Settings")
.header(title)
.selected_tag(section)
.on_selection_changed({
let ss = set_section.clone();