Persist advanced options expand/collapse state per section

This commit is contained in:
2026-03-06 17:49:07 +02:00
parent 646a698ac1
commit f301f1a78b
7 changed files with 58 additions and 4 deletions

View File

@@ -372,9 +372,16 @@ pub fn build_resize_page(state: &AppState) -> adw::NavigationPage {
.title("Advanced Options")
.subtitle("Resize algorithm, DPI, upscale behavior")
.show_enable_switch(false)
.expanded(state.detailed_mode)
.expanded(state.is_section_expanded("resize-advanced"))
.build();
{
let st = state.clone();
advanced_expander.connect_expanded_notify(move |row| {
st.set_section_expanded("resize-advanced", row.is_expanded());
});
}
let upscale_row = adw::SwitchRow::builder()
.title("Allow Upscaling")
.subtitle("Enlarge images smaller than target size")