Skip to content

Commit

Permalink
Restore horizontal scrollbar checks
Browse files Browse the repository at this point in the history
  • Loading branch information
SomeoneToIgnore committed Oct 25, 2024
1 parent 4325819 commit dee4a34
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions crates/project_panel/src/project_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2821,6 +2821,17 @@ impl ProjectPanel {
return None;
}

let scroll_handle = self.scroll_handle.0.borrow();
let longest_item_width = scroll_handle
.last_item_size
.filter(|size| size.contents.width > size.item.width)?
.contents
.width
.0 as f64;
if longest_item_width < scroll_handle.base_handle.bounds().size.width.0 as f64 {
return None;
}

Some(
div()
.occlude()
Expand Down

0 comments on commit dee4a34

Please sign in to comment.