From 3124450aff0894a775808f6e7752d7fa42740dfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Wed, 22 Jan 2020 11:21:16 +0100 Subject: [PATCH] Center items in `counter` example --- examples/counter/src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/counter/src/main.rs b/examples/counter/src/main.rs index b85db70d..d9311076 100644 --- a/examples/counter/src/main.rs +++ b/examples/counter/src/main.rs @@ -1,4 +1,4 @@ -use iced::{button, Button, Column, Element, Sandbox, Settings, Text}; +use iced::{button, Align, Button, Column, Element, Sandbox, Settings, Text}; pub fn main() { Counter::run(Settings::default()) @@ -42,6 +42,7 @@ impl Sandbox for Counter { fn view(&mut self) -> Element { Column::new() .padding(20) + .align_items(Align::Center) .push( Button::new(&mut self.increment_button, Text::new("Increment")) .on_press(Message::IncrementPressed),