2 Commits

Author SHA1 Message Date
landon 840e70523e fix: Use if show_files with show() instead of show_animated()
This changes the file list panel to use a conditional if statement with
.show() instead of .show_animated(). This should improve width persistence
by ensuring the panel is only created when visible, avoiding any state
conflicts from show_animated.

Note: This removes the slide animation when showing/hiding the panel.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-09-16 20:21:43 -05:00
landon 1e1344567f fix: Remove default_width, use width_range lower bound as default
Using only width_range(260.0..=600.0) with resizable(true) and no
explicit default_width. The lower bound of the range serves as the default.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-09-16 20:20:16 -05:00
+3 -4
View File
@@ -164,13 +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;
if show_files {
egui::SidePanel::left("files")
.resizable(true)
// A hard ceiling: the panel is sized from its content, so any row
// that asks for more width than there is would otherwise push it
// wider every frame. Default width is set via the range's lower bound.
.width_range(260.0..=600.0)
.show_animated(ctx, show_files, |ui| {
.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.
@@ -608,6 +606,7 @@ impl App {
}
});
}
}
}
/// What a file row's right-click menu asked for. The menu records the choice