Make horizontal_space and vertical_space fill by default

This commit is contained in:
Héctor Ramón Jiménez 2024-02-15 02:08:22 +01:00
parent 9dd20ead08
commit e8049af23d
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
16 changed files with 54 additions and 46 deletions

View file

@ -111,13 +111,9 @@ impl Application for App {
fn view(&self) -> Element<Message> {
let content = container(
column![
row![
text("Top Left"),
horizontal_space(Length::Fill),
text("Top Right")
]
.align_items(Alignment::Start)
.height(Length::Fill),
row![text("Top Left"), horizontal_space(), text("Top Right")]
.align_items(Alignment::Start)
.height(Length::Fill),
container(
button(text("Show Modal")).on_press(Message::ShowModal)
)
@ -127,7 +123,7 @@ impl Application for App {
.height(Length::Fill),
row![
text("Bottom Left"),
horizontal_space(Length::Fill),
horizontal_space(),
text("Bottom Right")
]
.align_items(Alignment::End)