Remove unnecessary code (#2860)
This commit is contained in:
parent
59235ff01c
commit
72adf3bde3
|
|
@ -445,7 +445,6 @@ impl ScrollArea {
|
|||
{
|
||||
// Clip the content, but only when we really need to:
|
||||
let clip_rect_margin = ui.visuals().clip_rect_margin;
|
||||
let scroll_bar_inner_margin = ui.spacing().scroll_bar_inner_margin;
|
||||
let mut content_clip_rect = ui.clip_rect();
|
||||
for d in 0..2 {
|
||||
if has_bar[d] {
|
||||
|
|
@ -453,13 +452,6 @@ impl ScrollArea {
|
|||
content_clip_rect.min[d] = inner_rect.min[d] - clip_rect_margin;
|
||||
content_clip_rect.max[d] = inner_rect.max[d] + clip_rect_margin;
|
||||
}
|
||||
|
||||
if state.show_scroll[d] {
|
||||
// Make sure content doesn't cover scroll bars
|
||||
let tiny_gap = 1.0;
|
||||
content_clip_rect.max[1 - d] =
|
||||
inner_rect.max[1 - d] + scroll_bar_inner_margin - tiny_gap;
|
||||
}
|
||||
} else {
|
||||
// Nice handling of forced resizing beyond the possible:
|
||||
content_clip_rect.max[d] = ui.clip_rect().max[d] - current_bar_use[d];
|
||||
|
|
|
|||
Loading…
Reference in New Issue