diff options
Diffstat (limited to 'web/src/widget/text.rs')
-rw-r--r-- | web/src/widget/text.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/web/src/widget/text.rs b/web/src/widget/text.rs index 6194a12e..2fdbc0a6 100644 --- a/web/src/widget/text.rs +++ b/web/src/widget/text.rs @@ -119,6 +119,9 @@ impl<'a, Message> Widget<Message> for Text { let content = bumpalo::format!(in bump, "{}", self.content); let color = style::color(self.color.unwrap_or(Color::BLACK)); + let width = style::length(self.width); + let height = style::length(self.height); + let text_align = match self.horizontal_alignment { HorizontalAlignment::Left => "left", HorizontalAlignment::Center => "center", @@ -127,7 +130,9 @@ impl<'a, Message> Widget<Message> for Text { let style = bumpalo::format!( in bump, - "font-size: {}px; color: {}; text-align: {}", + "width: {}; height: {}; font-size: {}px; color: {}; text-align: {}", + width, + height, self.size.unwrap_or(20), color, text_align |