Merge branch 'master' into feature/custom-styling
This commit is contained in:
commit
5e018965ee
18 changed files with 48 additions and 51 deletions
|
|
@ -146,6 +146,7 @@ impl Application for Todos {
|
|||
..
|
||||
}) => {
|
||||
let title = Text::new("todos")
|
||||
.width(Length::Fill)
|
||||
.size(100)
|
||||
.color([0.5, 0.5, 0.5])
|
||||
.horizontal_alignment(HorizontalAlignment::Center);
|
||||
|
|
@ -284,7 +285,8 @@ impl Task {
|
|||
self.completed,
|
||||
&self.description,
|
||||
TaskMessage::Completed,
|
||||
);
|
||||
)
|
||||
.width(Length::Fill);
|
||||
|
||||
Row::new()
|
||||
.spacing(20)
|
||||
|
|
@ -318,9 +320,10 @@ impl Task {
|
|||
.push(
|
||||
Button::new(
|
||||
delete_button,
|
||||
Row::new().spacing(10).push(delete_icon()).push(
|
||||
Text::new("Delete").width(Length::Shrink),
|
||||
),
|
||||
Row::new()
|
||||
.spacing(10)
|
||||
.push(delete_icon())
|
||||
.push(Text::new("Delete")),
|
||||
)
|
||||
.on_press(TaskMessage::Delete)
|
||||
.padding(10)
|
||||
|
|
@ -350,7 +353,7 @@ impl Controls {
|
|||
let tasks_left = tasks.iter().filter(|task| !task.completed).count();
|
||||
|
||||
let filter_button = |state, label, filter, current_filter| {
|
||||
let label = Text::new(label).size(16).width(Length::Shrink);
|
||||
let label = Text::new(label).size(16);
|
||||
let button =
|
||||
Button::new(state, label).style(style::Button::Filter {
|
||||
selected: filter == current_filter,
|
||||
|
|
@ -368,11 +371,11 @@ impl Controls {
|
|||
tasks_left,
|
||||
if tasks_left == 1 { "task" } else { "tasks" }
|
||||
))
|
||||
.width(Length::Fill)
|
||||
.size(16),
|
||||
)
|
||||
.push(
|
||||
Row::new()
|
||||
.width(Length::Shrink)
|
||||
.spacing(10)
|
||||
.push(filter_button(
|
||||
all_button,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue