From c876c61ec69c4adacdab5c1f53474b89e7e12dd1 Mon Sep 17 00:00:00 2001 From: Mollusk Date: Fri, 29 May 2026 03:09:40 -0400 Subject: [PATCH] fix(gui): scroll the Settings body and add a Defaults reset to the editor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Settings screen grew past a short window once the Appearance section landed, forcing a manual resize to reach the Save button. Wrap the body in a vertical ScrollArea (header stays pinned), mirroring the Host screen. Also add a '↺ Defaults' button to the right of Save in the theme editor that resets the draft to the original Default Dark palette (previews live). Co-Authored-By: Claude Opus 4.8 --- src/gui/mod.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/gui/mod.rs b/src/gui/mod.rs index eb7954e..8e20686 100644 --- a/src/gui/mod.rs +++ b/src/gui/mod.rs @@ -1010,6 +1010,13 @@ impl PixelPassApp { ui.heading("Settings"); }); ui.separator(); + // Body scrolls; the header above stays pinned. The Appearance editor + // (13 colour rows + Save) overflows a short window otherwise — you'd + // have to resize the window to reach the Save button. + egui::ScrollArea::vertical().show(ui, |ui| self.settings_body(ui)); + } + + fn settings_body(&mut self, ui: &mut egui::Ui) { ui.add_space(4.0); let resp = ui.checkbox( @@ -1149,6 +1156,13 @@ impl PixelPassApp { if ui.button("💾 Save").clicked() { self.save_draft_theme(); } + // Reset the draft to the original Default Dark palette. Previews + // live (the editor applies the draft each frame), so it snaps back + // immediately; Save persists it, Cancel discards. + if ui.button("↺ Defaults").clicked() { + self.theme.draft = theme::default_dark(); + self.theme.status = Some("Reset to the Default Dark palette.".to_string()); + } if ui.button("Cancel").clicked() { self.cancel_theme_edit(); }