Skip to content

Commit

Permalink
Update scroll_area.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
rustbasic authored Jun 14, 2024
1 parent 814ad07 commit cb8e512
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/egui/src/containers/scroll_area.rs
Original file line number Diff line number Diff line change
Expand Up @@ -967,9 +967,9 @@ impl Prepared {
// left/rigth of a vertical scroll (d==1).
let mut cross = if scroll_style.floating {
let max_bar_rect = if d == 0 {
outer_rect.with_min_y(outer_rect.max.y - scroll_style.allocated_width())
outer_rect.with_min_y(outer_rect.max.y - scroll_style.bar_width)
} else {
outer_rect.with_min_x(outer_rect.max.x - scroll_style.allocated_width())
outer_rect.with_min_x(outer_rect.max.x - scroll_style.bar_width)
};
let is_hovering_bar_area = is_hovering_outer_rect
&& ui.rect_contains_pointer(max_bar_rect)
Expand Down

0 comments on commit cb8e512

Please sign in to comment.