diff options
| author | Laurenz <laurmaedje@gmail.com> | 2019-10-11 20:28:22 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2019-10-11 20:28:22 +0200 |
| commit | 6f22e4f13c42f06b686a01fbdd28a0163e88ae77 (patch) | |
| tree | a78145f5f9d84325529a8529875c9ef6ca5b9a1a /src/layout/flex.rs | |
| parent | c0e4fd55e6fa738cfc5dcc851d0fc3ee2d0f2cd2 (diff) | |
Render debug boxes ðŸ§
Diffstat (limited to 'src/layout/flex.rs')
| -rw-r--r-- | src/layout/flex.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/layout/flex.rs b/src/layout/flex.rs index 8c099553..75674e8f 100644 --- a/src/layout/flex.rs +++ b/src/layout/flex.rs @@ -1,7 +1,7 @@ //! Flexible and lazy layouting of boxes. use crate::size::{Size, Size2D}; -use super::{BoxLayout, ActionList, LayoutSpace, Alignment, LayoutResult, LayoutError}; +use super::*; /// A flex layout consists of a yet unarranged list of boxes. @@ -76,7 +76,7 @@ pub struct FlexContext { struct FlexFinisher { units: Vec<FlexUnit>, ctx: FlexContext, - actions: ActionList, + actions: LayoutActionList, dimensions: Size2D, usable: Size2D, cursor: Size2D, @@ -92,7 +92,7 @@ impl FlexFinisher { FlexFinisher { units: layout.units, ctx, - actions: ActionList::new(), + actions: LayoutActionList::new(), dimensions: match ctx.space.alignment { Alignment::Left => Size2D::zero(), Alignment::Right => Size2D::with_x(space.usable().x), @@ -129,6 +129,7 @@ impl FlexFinisher { self.ctx.space.dimensions }, actions: self.actions.into_vec(), + debug_render: true, }) } @@ -187,7 +188,7 @@ impl FlexFinisher { }, }; - self.actions.add_box_absolute(position, layout); + self.actions.add_box(position, layout); } // Stretch the dimensions to at least the line width. |
