7 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
landon be49729af2 fix: Cap row_width to prevent panel from expanding infinitely
Capped row_width at 580.0 to prevent the content from pushing the
panel wider than the user intends, breaking the content-width loop.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-09-16 20:14:39 -05:00
landon 1374af8439 fix: Use width_range(260-600) as default, remove explicit default_width
This uses the lower bound of the range as the default width, which should
work better with the resizable panel.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-09-16 20:09:33 -05:00
landon a2f059652d Revert: Set file list width range to 160-600 (was INFINITY)
The INFINITY upper bound caused the panel to expand to fill the window.
Changed back to a reasonable max of 600.0 pixels.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-09-16 20:08:36 -05:00
landon 2ab78acaa6 fix: Allow file list panel to be resized beyond 460px
Changed width_range from 160.0..=460.0 to 160.0..=f32::INFINITY to allow
the user to make the file list panel as wide as they want without it
snapping back to the maximum width.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-09-16 20:02:41 -05:00
landon 43279810a5 fix: Change file list panel from show_animated to show
show_animated may have issues with width persistence when resizing.
Using show() instead should allow the panel to remember its width.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-09-16 19:01:38 -05:00
+8 -9
View File
@@ -164,14 +164,11 @@ impl App {
/// editor rather than leaving an empty column. /// editor rather than leaving an empty column.
pub(super) fn left_pane(&mut self, ctx: &egui::Context) { pub(super) fn left_pane(&mut self, ctx: &egui::Context) {
let show_files = self.config.show_file_panel; let show_files = self.config.show_file_panel;
egui::SidePanel::left("files") if show_files {
.resizable(true) egui::SidePanel::left("files")
.default_width(260.0) .resizable(true)
// A hard ceiling: the panel is sized from its content, so any row .width_range(260.0..=600.0)
// that asks for more width than there is would otherwise push it .show(ctx, |ui| {
// wider every frame.
.width_range(160.0..=460.0)
.show_animated(ctx, show_files, |ui| {
// The default theme renders unselected list rows fairly dim; bump // The default theme renders unselected list rows fairly dim; bump
// the widget text colours so file names stay legible (especially in // the widget text colours so file names stay legible (especially in
// dark mode) without affecting the rest of the app. // dark mode) without affecting the rest of the app.
@@ -251,7 +248,8 @@ impl App {
// Measured once, from the panel rather than from the scrolled // Measured once, from the panel rather than from the scrolled
// content: reading `available_width()` inside a row makes the // content: reading `available_width()` inside a row makes the
// content's width depend on the content's width. // content's width depend on the content's width.
let row_width = ui.available_width(); // Cap the width to prevent the panel from expanding infinitely.
let row_width = ui.available_width().min(580.0);
let nested = rows.iter().any(|r| r.depth > 0); let nested = rows.iter().any(|r| r.depth > 0);
egui::ScrollArea::vertical() egui::ScrollArea::vertical()
@@ -607,6 +605,7 @@ impl App {
}); });
} }
}); });
}
} }
} }