diff options
| author | Laurenz <laurmaedje@gmail.com> | 2019-10-13 12:08:07 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2019-10-13 12:08:07 +0200 |
| commit | 463e4ebd8234da5e28700e9b22b6ef5f0dfef56f (patch) | |
| tree | 01f3961d6996de3ee8f9819c2792f6ee8c2a3c3d /src/library/styles.rs | |
| parent | 6f22e4f13c42f06b686a01fbdd28a0163e88ae77 (diff) | |
Refactor layout types 🚧
Diffstat (limited to 'src/library/styles.rs')
| -rw-r--r-- | src/library/styles.rs | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/library/styles.rs b/src/library/styles.rs index c84b9fed..28cc0e48 100644 --- a/src/library/styles.rs +++ b/src/library/styles.rs @@ -1,7 +1,7 @@ //! Basic style functions: bold, italic, monospace. use super::prelude::*; -use toddle::query::FontClass; +// use toddle::query::FontClass; @@ -27,19 +27,20 @@ macro_rules! style_func { } } - fn layout(&self, ctx: LayoutContext) -> LayoutResult<Option<Layout>> { - // Change the context. - let mut $style = ctx.style.clone(); - $style_change + fn layout(&self, ctx: LayoutContext) -> LayoutResult<FuncCommands> { + // // Change the context. + // let mut $style = ctx.style.clone(); + // $style_change - // Create a box and put it into a flex layout. - let boxed = layout(&self.body, LayoutContext { - style: &$style, - .. ctx - })?; - let flex = FlexLayout::from_box(boxed); + // // Create a box and put it into a flex layout. + // let boxed = layout(&self.body, LayoutContext { + // style: &$style, + // .. ctx + // })?; + // let flex = FlexLayout::from_box(boxed); - Ok(Some(Layout::Flex(flex))) + // Ok(Some(Layout::Flex(flex))) + Ok(FuncCommands::new()) } } }; |
