Add several missing style attributes in iced_web.

This commit is contained in:
Gabriel Konat 2019-12-16 11:09:02 +01:00
parent 0f2e20f5e5
commit 95988e8e25
5 changed files with 26 additions and 7 deletions

View file

@ -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