summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-02-06 01:25:03 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-02-06 01:25:03 +0100
commit38a35ab639de3cb14cafa2cecef7ecf56d29b631 (patch)
treea93e968f3354e19df08e4b70c92d2754faca358f /web
parentf5228695a2fcdecd1da9071d477ee34855783b29 (diff)
downloadiced-38a35ab639de3cb14cafa2cecef7ecf56d29b631.tar.gz
iced-38a35ab639de3cb14cafa2cecef7ecf56d29b631.tar.bz2
iced-38a35ab639de3cb14cafa2cecef7ecf56d29b631.zip
Fix `Button` styling in `iced_web`
Diffstat (limited to 'web')
-rw-r--r--web/src/widget/button.rs11
1 files changed, 4 insertions, 7 deletions
diff --git a/web/src/widget/button.rs b/web/src/widget/button.rs
index e47b971d..3a5afe60 100644
--- a/web/src/widget/button.rs
+++ b/web/src/widget/button.rs
@@ -144,9 +144,6 @@ where
// TODO: State-based styling
let style = self.style.active();
- let width = css::length(self.width);
- let color = css::color(style.text_color);
-
let padding_class =
style_sheet.insert(bump, css::Rule::Padding(self.padding));
@@ -166,12 +163,12 @@ where
"style",
bumpalo::format!(
in bump,
- "background: {}; border-radius: {}px; width:{}; min-width: {}px; color: {}",
+ "background: {}; border-radius: {}px; width:{}; min-width: {}; color: {}",
background,
style.border_radius,
- width,
- self.min_width,
- color
+ css::length(self.width),
+ css::min_length(self.min_width),
+ css::color(style.text_color)
)
.into_bump_str(),
)