1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 13:20:05 -04:00

[emath] Use const values for Vec2::ZERO, Rect::EVERYTHING etc

This commit is contained in:
Emil Ernerfeldt
2021-02-05 09:49:21 +01:00
parent 10e86b055d
commit 2d9d06dbff
20 changed files with 118 additions and 71 deletions

View File

@@ -90,7 +90,7 @@ impl super::View for Scrolling {
let (current_scroll, max_scroll) = scroll_area.show(ui, |ui| {
if scroll_top {
ui.scroll_to_cursor(Align::top());
ui.scroll_to_cursor(Align::TOP);
}
ui.vertical(|ui| {
for item in 1..=50 {
@@ -104,7 +104,7 @@ impl super::View for Scrolling {
});
if scroll_bottom {
ui.scroll_to_cursor(Align::bottom());
ui.scroll_to_cursor(Align::BOTTOM);
}
let margin = ui.visuals().clip_rect_margin;