summaryrefslogtreecommitdiffstats
path: root/web/src/widget/text.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-07-08 11:44:40 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-07-08 11:44:40 +0200
commitf3dfaa2c43bad16fc91660b2b73cb9173549e7ec (patch)
tree353365f4dd1e3136bc651ac8c1572f62fff1304b /web/src/widget/text.rs
parent072ec69d53d2708d8fd1693151bcec7305efccf8 (diff)
parent5c4f5ae5ecb36703a95cafb2cd58692529c9466d (diff)
downloadiced-f3dfaa2c43bad16fc91660b2b73cb9173549e7ec.tar.gz
iced-f3dfaa2c43bad16fc91660b2b73cb9173549e7ec.tar.bz2
iced-f3dfaa2c43bad16fc91660b2b73cb9173549e7ec.zip
Merge branch 'master' into feature/pane-grid-titlebar
Diffstat (limited to 'web/src/widget/text.rs')
-rw-r--r--web/src/widget/text.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/web/src/widget/text.rs b/web/src/widget/text.rs
index 3ec565a8..2f7308ee 100644
--- a/web/src/widget/text.rs
+++ b/web/src/widget/text.rs
@@ -116,7 +116,12 @@ impl<'a, Message> Widget<Message> for Text {
) -> dodrio::Node<'b> {
use dodrio::builder::*;
- let content = bumpalo::format!(in bump, "{}", self.content);
+ let content = {
+ use dodrio::bumpalo::collections::String;
+
+ String::from_str_in(&self.content, bump)
+ };
+
let color = self
.color
.map(css::color)
@@ -133,7 +138,8 @@ impl<'a, Message> Widget<Message> for Text {
let style = bumpalo::format!(
in bump,
- "width: {}; height: {}; font-size: {}px; color: {}; text-align: {}; font-family: {}",
+ "width: {}; height: {}; font-size: {}px; color: {}; \
+ text-align: {}; font-family: {}",
width,
height,
self.size.unwrap_or(20),