summaryrefslogtreecommitdiffstats
path: root/examples/todos.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/todos.rs')
-rw-r--r--examples/todos.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/examples/todos.rs b/examples/todos.rs
index 4caad949..7f37300b 100644
--- a/examples/todos.rs
+++ b/examples/todos.rs
@@ -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()
}
}