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

@ -34,7 +34,6 @@ impl Component {
}
mod numeric_input {
use iced::alignment::{self, Alignment};
use iced::widget::{button, component, row, text, text_input, Component};
use iced::{Element, Length, Size};
@ -108,8 +107,7 @@ mod numeric_input {
text(label)
.width(Length::Fill)
.height(Length::Fill)
.horizontal_alignment(alignment::Horizontal::Center)
.vertical_alignment(alignment::Vertical::Center),
.center(),
)
.width(40)
.height(40)
@ -130,7 +128,7 @@ mod numeric_input {
.padding(10),
button("+", Event::IncrementPressed),
]
.align_items(Alignment::Center)
.center_y()
.spacing(10)
.into()
}