Skip to content

Commit

Permalink
fix scroll artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
woelper committed Jan 12, 2025
1 parent d7cbc21 commit 1fbbc67
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/filebrowser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ pub fn browse<F: FnMut(&PathBuf)>(
let r = ui.available_rect_before_wrap();

let spacing = ui.style().spacing.item_spacing.x;
let w = r.width() - spacing * 3.;
let w = r.width() - spacing * 3. + 2.;

let thumbs_per_row = (w / (THUMB_SIZE[0] as f32 + spacing))
.floor()
Expand All @@ -464,7 +464,7 @@ pub fn browse<F: FnMut(&PathBuf)>(
.show(ui, |ui| {
egui::ScrollArea::new([false, true])
.min_scrolled_height(400.)
.auto_shrink([true, false])
.auto_shrink([false, false])
.show_rows(
ui,
(THUMB_SIZE[1] + THUMB_CAPTION_HEIGHT) as f32,
Expand Down

0 comments on commit 1fbbc67

Please sign in to comment.