Add several missing style attributes in iced_web.
This commit is contained in:
parent
0f2e20f5e5
commit
95988e8e25
5 changed files with 26 additions and 7 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue