From cb8e51244e10aa23ee64b3d25730002d1cb3d45f Mon Sep 17 00:00:00 2001 From: rustbasic <127506429+rustbasic@users.noreply.github.com> Date: Fri, 14 Jun 2024 18:41:42 +0900 Subject: [PATCH] Update scroll_area.rs --- crates/egui/src/containers/scroll_area.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/egui/src/containers/scroll_area.rs b/crates/egui/src/containers/scroll_area.rs index 536b3c33a94..6163b138aa4 100644 --- a/crates/egui/src/containers/scroll_area.rs +++ b/crates/egui/src/containers/scroll_area.rs @@ -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)