Merge branch 'master' into advanced-text
This commit is contained in:
commit
4bae457c37
73 changed files with 1586 additions and 703 deletions
|
|
@ -210,15 +210,12 @@ impl Application for Todos {
|
|||
.style(Color::from([0.5, 0.5, 0.5]))
|
||||
.horizontal_alignment(alignment::Horizontal::Center);
|
||||
|
||||
let input = text_input(
|
||||
"What needs to be done?",
|
||||
input_value,
|
||||
Message::InputChanged,
|
||||
)
|
||||
.id(INPUT_ID.clone())
|
||||
.padding(15)
|
||||
.size(30)
|
||||
.on_submit(Message::CreateTask);
|
||||
let input = text_input("What needs to be done?", input_value)
|
||||
.id(INPUT_ID.clone())
|
||||
.on_input(Message::InputChanged)
|
||||
.on_submit(Message::CreateTask)
|
||||
.padding(15)
|
||||
.size(30);
|
||||
|
||||
let controls = view_controls(tasks, *filter);
|
||||
let filtered_tasks =
|
||||
|
|
@ -381,14 +378,12 @@ impl Task {
|
|||
.into()
|
||||
}
|
||||
TaskState::Editing => {
|
||||
let text_input = text_input(
|
||||
"Describe your task...",
|
||||
&self.description,
|
||||
TaskMessage::DescriptionEdited,
|
||||
)
|
||||
.id(Self::text_input_id(i))
|
||||
.on_submit(TaskMessage::FinishEdition)
|
||||
.padding(10);
|
||||
let text_input =
|
||||
text_input("Describe your task...", &self.description)
|
||||
.id(Self::text_input_id(i))
|
||||
.on_input(TaskMessage::DescriptionEdited)
|
||||
.on_submit(TaskMessage::FinishEdition)
|
||||
.padding(10);
|
||||
|
||||
row![
|
||||
text_input,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue