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

This commit is contained in:
Emil Ernerfeldt
2021-02-05 10:11:39 +01:00
parent 10e86b055d
commit 2d9d06dbff
20 changed files with 118 additions and 71 deletions
+2 -2
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;