[scroll] remember to expand clip region with the clip_rect_margin
This commit is contained in:
parent
2fa03f9a6c
commit
de95209676
1 changed files with 2 additions and 1 deletions
|
@ -96,7 +96,8 @@ impl ScrollArea {
|
||||||
inner_rect.min - state.offset,
|
inner_rect.min - state.offset,
|
||||||
vec2(inner_size.x, f32::INFINITY),
|
vec2(inner_size.x, f32::INFINITY),
|
||||||
));
|
));
|
||||||
let mut content_clip_rect = ui.clip_rect().intersect(inner_rect);
|
let mut content_clip_rect = inner_rect.expand(ui.style().clip_rect_margin);
|
||||||
|
content_clip_rect = content_clip_rect.intersect(ui.clip_rect());
|
||||||
content_clip_rect.max.x = ui.clip_rect().max.x - current_scroll_bar_width; // Nice handling of forced resizing beyond the possible
|
content_clip_rect.max.x = ui.clip_rect().max.x - current_scroll_bar_width; // Nice handling of forced resizing beyond the possible
|
||||||
content_ui.set_clip_rect(content_clip_rect);
|
content_ui.set_clip_rect(content_clip_rect);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue