diff options
| author | Laurenz <laurmaedje@gmail.com> | 2020-01-24 16:23:57 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2020-01-24 16:23:57 +0100 |
| commit | 0a087cd28bbee5fcdffbb9d49b0ba9f413ad7f92 (patch) | |
| tree | fe00c96969ed2ee69e6d3b42de8ff2558f792edd /src/library/font.rs | |
| parent | 03fddaf3aea778057aedd74dbcb27bae971ec22f (diff) | |
Reorganize modules 🧱
Diffstat (limited to 'src/library/font.rs')
| -rw-r--r-- | src/library/font.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/library/font.rs b/src/library/font.rs index b4a6218a..07707e90 100644 --- a/src/library/font.rs +++ b/src/library/font.rs @@ -1,4 +1,5 @@ use toddle::query::{FontWeight, FontStyle}; +use crate::size::FSize; use super::*; @@ -79,7 +80,7 @@ function! { #[derive(Debug, Clone, PartialEq)] pub struct FontSizeFunc { body: Option<SyntaxModel>, - size: Option<ScaleSize>, + size: Option<FSize>, } parse(header, body, ctx, errors, decos) { @@ -93,11 +94,11 @@ function! { layout(self, ctx, errors) { styled(&self.body, ctx, self.size, |t, s| { match s { - ScaleSize::Absolute(size) => { + FSize::Absolute(size) => { t.base_font_size = size; t.font_scale = 1.0; } - ScaleSize::Scaled(scale) => t.font_scale = scale, + FSize::Scaled(scale) => t.font_scale = scale, } }) } |
