summaryrefslogtreecommitdiffstats
path: root/web/src/widget/button.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2020-07-01 22:44:48 +0200
committerLibravatar GitHub <noreply@github.com>2020-07-01 22:44:48 +0200
commit3f44d331d9c7afe14416130f54abd2b327a686bf (patch)
treefa68d060aabedda82c268a4cc06c501cbf1e626b /web/src/widget/button.rs
parent99a50d6b2ff2c54c276d3a142071bd77ac38e4f0 (diff)
parent75464ad89422884e0718eb0429586a9d77f61c71 (diff)
downloadiced-3f44d331d9c7afe14416130f54abd2b327a686bf.tar.gz
iced-3f44d331d9c7afe14416130f54abd2b327a686bf.tar.bz2
iced-3f44d331d9c7afe14416130f54abd2b327a686bf.zip
Merge pull request #432 from hecrj/improvement/update-dodrio
Update `dodrio` in `iced_web`
Diffstat (limited to 'web/src/widget/button.rs')
-rw-r--r--web/src/widget/button.rs14
1 files changed, 9 insertions, 5 deletions
diff --git a/web/src/widget/button.rs b/web/src/widget/button.rs
index 3a5afe60..a4bcc33d 100644
--- a/web/src/widget/button.rs
+++ b/web/src/widget/button.rs
@@ -154,16 +154,20 @@ where
},
};
+ let class = {
+ use dodrio::bumpalo::collections::String;
+
+ String::from_str_in(&padding_class, bump).into_bump_str()
+ };
+
let mut node = button(bump)
- .attr(
- "class",
- bumpalo::format!(in bump, "{}", padding_class).into_bump_str(),
- )
+ .attr("class", class)
.attr(
"style",
bumpalo::format!(
in bump,
- "background: {}; border-radius: {}px; width:{}; min-width: {}; color: {}",
+ "background: {}; border-radius: {}px; width:{}; \
+ min-width: {}; color: {}",
background,
style.border_radius,
css::length(self.width),