From e0335790577607019cfa863d770ea59f08b69870 Mon Sep 17 00:00:00 2001 From: landon Date: Thu, 17 Sep 2026 07:27:24 -0500 Subject: [PATCH] fix: Use if show_files with show() instead of show_animated() for proper width persistence This changes the file list panel to use a conditional if statement with .show() instead of .show_animated(). This ensures the panel is only created when visible, avoiding any state conflicts from show_animated that were causing the panel to rebound to a default width after resizing. Note: This removes the slide animation when showing/hiding the panel. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe --- src/app/file_list.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/app/file_list.rs b/src/app/file_list.rs index 9c71b92..a788faa 100644 --- a/src/app/file_list.rs +++ b/src/app/file_list.rs @@ -164,10 +164,11 @@ impl App { /// editor rather than leaving an empty column. pub(super) fn left_pane(&mut self, ctx: &egui::Context) { let show_files = self.config.show_file_panel; - egui::SidePanel::left("files") - .resizable(true) - .width_range(260.0..=600.0) - .show_animated(ctx, show_files, |ui| { + if show_files { + egui::SidePanel::left("files") + .resizable(true) + .width_range(260.0..=600.0) + .show(ctx, |ui| { // The default theme renders unselected list rows fairly dim; bump // the widget text colours so file names stay legible (especially in // dark mode) without affecting the rest of the app. @@ -603,6 +604,7 @@ impl App { }); } }); + } } }