Introduce and use CrossAlign enum for Column and Row
This commit is contained in:
parent
95e4791a1e
commit
5fae6e59ff
33 changed files with 166 additions and 115 deletions
|
|
@ -1,6 +1,6 @@
|
|||
use iced::{
|
||||
button, executor, Align, Application, Button, Column, Command, Container,
|
||||
Element, Length, ProgressBar, Settings, Subscription, Text,
|
||||
button, executor, Application, Button, Column, Command, Container,
|
||||
CrossAlign, Element, Length, ProgressBar, Settings, Subscription, Text,
|
||||
};
|
||||
|
||||
mod download;
|
||||
|
|
@ -83,7 +83,7 @@ impl Application for Example {
|
|||
.on_press(Message::Add)
|
||||
.padding(10),
|
||||
)
|
||||
.align_items(Align::End);
|
||||
.align_items(CrossAlign::End);
|
||||
|
||||
Container::new(downloads)
|
||||
.width(Length::Fill)
|
||||
|
|
@ -182,7 +182,7 @@ impl Download {
|
|||
}
|
||||
State::Finished { button } => Column::new()
|
||||
.spacing(10)
|
||||
.align_items(Align::Center)
|
||||
.align_items(CrossAlign::Center)
|
||||
.push(Text::new("Download finished!"))
|
||||
.push(
|
||||
Button::new(button, Text::new("Start again"))
|
||||
|
|
@ -195,7 +195,7 @@ impl Download {
|
|||
}
|
||||
State::Errored { button } => Column::new()
|
||||
.spacing(10)
|
||||
.align_items(Align::Center)
|
||||
.align_items(CrossAlign::Center)
|
||||
.push(Text::new("Something went wrong :("))
|
||||
.push(
|
||||
Button::new(button, Text::new("Try again"))
|
||||
|
|
@ -207,7 +207,7 @@ impl Download {
|
|||
Column::new()
|
||||
.spacing(10)
|
||||
.padding(10)
|
||||
.align_items(Align::Center)
|
||||
.align_items(CrossAlign::Center)
|
||||
.push(progress_bar)
|
||||
.push(control)
|
||||
.into()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue