Document geometry
This commit is contained in:
parent
f833cd7c16
commit
ac07e230fa
8 changed files with 1285 additions and 34 deletions
|
@ -102,7 +102,7 @@ impl Element for Overlay {
|
|||
|
||||
let mut desired = self.anchor_corner.get_bounds(origin, size);
|
||||
let limits = Bounds {
|
||||
origin: Point::zero(),
|
||||
origin: Point::default(),
|
||||
size: cx.viewport_size(),
|
||||
};
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -15,7 +15,7 @@ impl TestDisplay {
|
|||
id: DisplayId(1),
|
||||
uuid: uuid::Uuid::new_v4(),
|
||||
bounds: Bounds::from_corners(
|
||||
Point::zero(),
|
||||
Point::default(),
|
||||
Point::new(GlobalPixels(1920.), GlobalPixels(1080.)),
|
||||
),
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ impl PlatformWindow for TestWindow {
|
|||
}
|
||||
|
||||
fn mouse_position(&self) -> Point<Pixels> {
|
||||
Point::zero()
|
||||
Point::default()
|
||||
}
|
||||
|
||||
fn as_any_mut(&mut self) -> &mut dyn std::any::Any {
|
||||
|
@ -223,7 +223,7 @@ impl PlatformAtlas for TestAtlas {
|
|||
},
|
||||
tile_id: TileId(tile_id),
|
||||
bounds: crate::Bounds {
|
||||
origin: Point::zero(),
|
||||
origin: Point::default(),
|
||||
size,
|
||||
},
|
||||
},
|
||||
|
|
|
@ -385,7 +385,7 @@ impl Default for Style {
|
|||
min_size: Size::auto(),
|
||||
max_size: Size::auto(),
|
||||
aspect_ratio: None,
|
||||
gap: Size::zero(),
|
||||
gap: Size::default(),
|
||||
// Aligment
|
||||
align_items: None,
|
||||
align_self: None,
|
||||
|
|
|
@ -1167,7 +1167,7 @@ impl<'a> WindowContext<'a> {
|
|||
}
|
||||
|
||||
let available_space = cx.window.viewport_size.map(Into::into);
|
||||
root_view.draw(Point::zero(), available_space, cx);
|
||||
root_view.draw(Point::default(), available_space, cx);
|
||||
})
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue