fix(client/windows): the settings pane stops auto-collapsing under the default window
WinUI Auto mode collapses the NavigationView pane below 1008 epx — narrower than the app's own 1000-wide default window, so the scope switcher kept getting booted out of the nav into its inline fallback. The page now forces the mode: Left (always expanded, at a tighter 250 pane length) down to 720 epx, LeftMinimal below that — the switcher lives in the pane wherever the content column still gets a workable width. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1326,12 +1326,13 @@ pub(crate) fn settings_page(props: &SettingsProps, cx: &mut RenderCx) -> Element
|
|||||||
// the whole surface read as clutter. Editing the profile itself (name, colour, delete)
|
// the whole surface read as clutter. Editing the profile itself (name, colour, delete)
|
||||||
// is a modal behind the "Edit profile…" button, not inline chrome.
|
// is a modal behind the "Edit profile…" button, not inline chrome.
|
||||||
//
|
//
|
||||||
// But ONLY while the pane is expanded: in Auto display mode WinUI collapses the pane
|
// But ONLY while the pane is expanded — pane-footer content is CLIPPED to the compact
|
||||||
// below 1008 epx (compact rail, then minimal), and pane-footer content is CLIPPED to the
|
// rail, not adapted. WinUI's Auto mode would collapse the pane below 1008 epx (under the
|
||||||
// rail, not adapted. Reactor exposes no pane-opened/closed event, so the switcher follows
|
// app's own 1000-wide default window!), which kept booting the switcher out of the nav,
|
||||||
// the same width threshold WinUI uses: expanded pane → footer; collapsed → a slim row at
|
// so the page FORCES the pane: expanded (`Left`, at a tighter 250 length) whenever the
|
||||||
// the top of the content column instead.
|
// content column still gets a workable width, minimal below that. Reactor exposes no
|
||||||
let pane_expanded = window_width >= 1008.0;
|
// pane-opened/closed event, so the switcher placement rides the same threshold.
|
||||||
|
let pane_expanded = window_width >= 720.0;
|
||||||
let catalog = ProfilesFile::load();
|
let catalog = ProfilesFile::load();
|
||||||
let mut scope_names = vec!["Default settings".to_string()];
|
let mut scope_names = vec!["Default settings".to_string()];
|
||||||
let mut scope_ids: Vec<String> = vec![String::new()];
|
let mut scope_ids: Vec<String> = vec![String::new()];
|
||||||
@@ -1527,6 +1528,12 @@ pub(crate) fn settings_page(props: &SettingsProps, cx: &mut RenderCx) -> Element
|
|||||||
});
|
});
|
||||||
let mut nav = NavigationView::new(items, content)
|
let mut nav = NavigationView::new(items, content)
|
||||||
.pane_title("Settings")
|
.pane_title("Settings")
|
||||||
|
.pane_display_mode(if pane_expanded {
|
||||||
|
NavigationViewPaneDisplayMode::Left
|
||||||
|
} else {
|
||||||
|
NavigationViewPaneDisplayMode::LeftMinimal
|
||||||
|
})
|
||||||
|
.open_pane_length(250.0)
|
||||||
.selected_tag(section)
|
.selected_tag(section)
|
||||||
.on_selection_changed({
|
.on_selection_changed({
|
||||||
let ss = set_section.clone();
|
let ss = set_section.clone();
|
||||||
|
|||||||
Reference in New Issue
Block a user