fix: text input layout & cargo fmt

This commit is contained in:
Ashley Wulber 2023-08-24 13:51:00 -04:00 committed by Ashley Wulber
parent d35dfad486
commit 6457481ae5
4 changed files with 89 additions and 22 deletions

View file

@ -500,7 +500,6 @@ impl State {
)
.on_input(Message::InputChanged)
// .on_submit(Message::Activate(None))
.padding(8)
.size(20)
.id(INPUT_ID.clone())
.into(),
@ -508,6 +507,11 @@ impl State {
.width(Length::Fill)
.on_input(Message::InputChanged)
.into(),
cosmic::widget::text_input("test", &self.entry_value)
.width(Length::Fixed(600.0))
.padding(32)
.on_input(Message::InputChanged)
.into(),
cosmic::widget::search_input(
"test",
&self.entry_value,
@ -516,6 +520,43 @@ impl State {
.width(Length::Fill)
.on_input(Message::InputChanged)
.into(),
cosmic::widget::text_input("test", &self.entry_value)
.width(Length::Fixed(600.0))
.on_input(Message::InputChanged)
.into(),
cosmic::widget::search_input(
"test",
&self.entry_value,
Some(Message::InputChanged("".to_string())),
)
.width(Length::Fixed(100.0))
.on_input(Message::InputChanged)
.into(),
cosmic::widget::search_input(
"test",
&self.entry_value,
Some(Message::InputChanged("".to_string())),
)
.padding([24, 48])
.width(Length::Fixed(400.0))
.on_input(Message::InputChanged)
.into(),
cosmic::widget::search_input(
"test",
&self.entry_value,
Some(Message::InputChanged("".to_string())),
)
.width(Length::Fixed(400.0))
.on_input(Message::InputChanged)
.into(),
cosmic::widget::search_input(
"test",
&self.entry_value,
Some(Message::InputChanged("".to_string())),
)
.width(Length::Fixed(800.0))
.on_input(Message::InputChanged)
.into(),
])
.into()
}