Implement Container widget
Remove `align_self` and `justify_content` methods
This commit is contained in:
parent
bfe19193b9
commit
ceb02f4a36
25 changed files with 310 additions and 205 deletions
|
|
@ -1,6 +1,6 @@
|
|||
use iced::{
|
||||
scrollable, text::HorizontalAlignment, text_input, Align, Application,
|
||||
Checkbox, Color, Column, Element, Scrollable, Text, TextInput,
|
||||
scrollable, text::HorizontalAlignment, text_input, Application, Checkbox,
|
||||
Color, Column, Container, Element, Length, Scrollable, Text, TextInput,
|
||||
};
|
||||
|
||||
pub fn main() {
|
||||
|
|
@ -78,7 +78,6 @@ impl Application for Todos {
|
|||
|
||||
let content = Column::new()
|
||||
.max_width(800)
|
||||
.align_self(Align::Center)
|
||||
.spacing(20)
|
||||
.push(title)
|
||||
.push(input)
|
||||
|
|
@ -86,7 +85,7 @@ impl Application for Todos {
|
|||
|
||||
Scrollable::new(&mut self.scroll)
|
||||
.padding(40)
|
||||
.push(content)
|
||||
.push(Container::new(content).width(Length::Fill).center_x())
|
||||
.into()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue