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 Apr 7, 2024
1 parent 1ec8131 commit 3c1d31c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/egui/src/containers/scroll_area.rs
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,10 @@ impl Prepared {
let max_offset = content_size - inner_rect.size();
let is_hovering_outer_rect = ui.rect_contains_pointer(outer_rect);

if scrolling_enabled {
if scrolling_enabled
&& (is_hovering_outer_rect
|| scroll_bar_visibility == ScrollBarVisibility::AlwaysVisible)
{
let always_scroll_enabled_direction = ui.style().always_scroll_the_only_direction
&& scroll_enabled[0] != scroll_enabled[1];
for d in 0..2 {
Expand Down

0 comments on commit 3c1d31c

Please sign in to comment.