Introduce helper methods for alignment for all widgets

This commit is contained in:
Héctor Ramón Jiménez 2024-07-12 15:11:30 +02:00
parent be06060117
commit f9dd5cbb09
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
45 changed files with 380 additions and 282 deletions

View file

@ -5,7 +5,7 @@ use iced::widget::{
self, button, center, column, container, horizontal_space, mouse_area,
opaque, pick_list, row, stack, text, text_input,
};
use iced::{Alignment, Color, Element, Length, Subscription, Task};
use iced::{Color, Element, Length, Subscription, Task};
use std::fmt;
@ -96,7 +96,6 @@ impl App {
let content = container(
column![
row![text("Top Left"), horizontal_space(), text("Top Right")]
.align_items(Alignment::Start)
.height(Length::Fill),
center(button(text("Show Modal")).on_press(Message::ShowModal)),
row![
@ -104,7 +103,7 @@ impl App {
horizontal_space(),
text("Bottom Right")
]
.align_items(Alignment::End)
.align_bottom()
.height(Length::Fill),
]
.height(Length::Fill),