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:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user