Center items in counter
example
This commit is contained in:
parent
b0515c1dd5
commit
3124450aff
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user