Persist advanced options expand/collapse state per section

Each ExpanderRow now remembers its expanded state between sessions
using a per-section key stored in SessionState. Replaces the global
detailed_mode toggle with granular per-section persistence.
This commit is contained in:
2026-03-06 17:49:07 +02:00
parent d8bb1a726a
commit afabdf3548
7 changed files with 58 additions and 4 deletions

View File

@@ -98,8 +98,16 @@ pub fn build_adjustments_page(state: &AppState) -> adw::NavigationPage {
.title("Advanced Adjustments")
.subtitle("Brightness, contrast, saturation, effects")
.show_enable_switch(false)
.expanded(state.is_section_expanded("adjustments-advanced"))
.build();
{
let st = state.clone();
adjust_expander.connect_expanded_notify(move |row| {
st.set_section_expanded("adjustments-advanced", row.is_expanded());
});
}
// Brightness slider (-100 to +100)
let brightness_row = adw::ActionRow::builder()
.title("Brightness")