Skip to content

Commit f5124c2

Browse files
scrollbar: Fix horizontal scrollbar display overflow last item (#19403)
currently, the laste item display is overflow by scrollbar, cause it cannot clickable. So remain one item height for display horizontal scrollbar,. ![Screenshot 2024-10-18 192352](https://github.com/user-attachments/assets/d686f0e8-93f8-426e-8816-6f00ed17a599) Release Notes: - N/A
1 parent ea46001 commit f5124c2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

crates/project_panel/src/project_panel.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -2701,7 +2701,6 @@ impl ProjectPanel {
27012701
.cursor_default()
27022702
.when(self.width.is_some(), |this| {
27032703
this.children(Scrollbar::horizontal(
2704-
//percentage as f32..end_offset as f32,
27052704
self.horizontal_scrollbar_state.clone(),
27062705
))
27072706
}),
@@ -2918,7 +2917,9 @@ impl Render for ProjectPanel {
29182917
.track_scroll(self.scroll_handle.clone()),
29192918
)
29202919
.children(self.render_vertical_scrollbar(cx))
2921-
.children(self.render_horizontal_scrollbar(cx))
2920+
.when_some(self.render_horizontal_scrollbar(cx), |this, scrollbar| {
2921+
this.pb_4().child(scrollbar)
2922+
})
29222923
.children(self.context_menu.as_ref().map(|(menu, position, _)| {
29232924
deferred(
29242925
anchored()

0 commit comments

Comments
 (0)