summaryrefslogtreecommitdiffstats
path: root/web/src/widget/text_input.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2019-12-18 23:20:19 +0100
committerLibravatar GitHub <noreply@github.com>2019-12-18 23:20:19 +0100
commit6f9de4130f6b3fe4ed0d4aa14b2cbc8d0d8e10e3 (patch)
treead267b855f2c5e3d9d2aced5ebb672c72ef52b2a /web/src/widget/text_input.rs
parent0f2e20f5e5b1f0658ab4e6cbe6fdda9ca97f2b36 (diff)
parent95988e8e251d5e416698d3883f85a469daed6365 (diff)
downloadiced-6f9de4130f6b3fe4ed0d4aa14b2cbc8d0d8e10e3.tar.gz
iced-6f9de4130f6b3fe4ed0d4aa14b2cbc8d0d8e10e3.tar.bz2
iced-6f9de4130f6b3fe4ed0d4aa14b2cbc8d0d8e10e3.zip
Merge pull request #127 from Gohla/web_styling
Add several missing style attributes in iced_web
Diffstat (limited to 'web/src/widget/text_input.rs')
-rw-r--r--web/src/widget/text_input.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/web/src/widget/text_input.rs b/web/src/widget/text_input.rs
index d6357512..99792c84 100644
--- a/web/src/widget/text_input.rs
+++ b/web/src/widget/text_input.rs
@@ -128,6 +128,8 @@ where
use dodrio::builder::*;
use wasm_bindgen::JsCast;
+ let width = style::length(self.width);
+ let max_width = style::length(self.max_width);
let padding_class =
style_sheet.insert(bump, Style::Padding(self.padding));
@@ -143,7 +145,9 @@ where
"style",
bumpalo::format!(
in bump,
- "font-size: {}px",
+ "width: {}; max-width: {}; font-size: {}px",
+ width,
+ max_width,
self.size.unwrap_or(20)
)
.into_bump_str(),