1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-29 04:40:03 -04:00

Remove clip_rect_margin (#8366)

* Closes https://github.com/emilk/egui/issues/5605
 
It has been zero by default for a few months now, and I do not wish to
support it. It was always an ugly hack, and it is no longer needed.
This commit is contained in:
Emil Ernerfeldt
2026-07-31 14:21:17 -07:00
committed by GitHub
parent 36341c21fe
commit b06f5fea09
6 changed files with 12 additions and 36 deletions

View File

@@ -340,10 +340,8 @@ impl crate::View for ScrollTo {
ui.scroll_to_cursor(Some(Align::BOTTOM));
}
let margin = ui.visuals().clip_rect_margin;
let current_scroll = ui.clip_rect().top() - ui.min_rect().top() + margin;
let max_scroll = ui.min_rect().height() - ui.clip_rect().height() + 2.0 * margin;
let current_scroll = ui.clip_rect().top() - ui.min_rect().top();
let max_scroll = ui.min_rect().height() - ui.clip_rect().height();
(current_scroll, max_scroll)
})
.inner;