summaryrefslogtreecommitdiffstats
path: root/examples/counter
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-01-22 11:21:16 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-01-22 11:21:16 +0100
commit3124450aff0894a775808f6e7752d7fa42740dfb (patch)
treefd9f048a58fc3bece856e43be43479f76da4b76b /examples/counter
parentb0515c1dd5a5c6dd91e1fa834051fe0c2f3271d2 (diff)
downloadiced-3124450aff0894a775808f6e7752d7fa42740dfb.tar.gz
iced-3124450aff0894a775808f6e7752d7fa42740dfb.tar.bz2
iced-3124450aff0894a775808f6e7752d7fa42740dfb.zip
Center items in `counter` example
Diffstat (limited to 'examples/counter')
-rw-r--r--examples/counter/src/main.rs3
1 files changed, 2 insertions, 1 deletions
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<Message> {
Column::new()
.padding(20)
+ .align_items(Align::Center)
.push(
Button::new(&mut self.increment_button, Text::new("Increment"))
.on_press(Message::IncrementPressed),