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

@@ -336,9 +336,16 @@ pub fn build_watermark_page(state: &AppState) -> adw::NavigationPage {
.title("Advanced Options")
.subtitle("Opacity, rotation, tiling, margin")
.show_enable_switch(false)
.expanded(state.detailed_mode)
.expanded(state.is_section_expanded("watermark-advanced"))
.build();
{
let st = state.clone();
advanced_expander.connect_expanded_notify(move |row| {
st.set_section_expanded("watermark-advanced", row.is_expanded());
});
}
// Text color picker
let color_row = adw::ActionRow::builder()
.title("Text Color")