diff options
author | 2021-07-21 19:10:11 +0700 | |
---|---|---|
committer | 2021-07-21 19:10:11 +0700 | |
commit | 39b8f7de50ca53c67214c4ec2af2d3a0944f006a (patch) | |
tree | 77a2cec7cdc829ef5966ba8b5f2664bd4f1024d0 /examples | |
parent | 72b3bf95de3f11812b1541fe2ffea76a515aee79 (diff) | |
download | iced-39b8f7de50ca53c67214c4ec2af2d3a0944f006a.tar.gz iced-39b8f7de50ca53c67214c4ec2af2d3a0944f006a.tar.bz2 iced-39b8f7de50ca53c67214c4ec2af2d3a0944f006a.zip |
Center window in `game_of_life` example
Diffstat (limited to 'examples')
-rw-r--r-- | examples/game_of_life/src/main.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/game_of_life/src/main.rs b/examples/game_of_life/src/main.rs index 64599163..642262b0 100644 --- a/examples/game_of_life/src/main.rs +++ b/examples/game_of_life/src/main.rs @@ -9,6 +9,7 @@ use iced::executor; use iced::pick_list::{self, PickList}; use iced::slider::{self, Slider}; use iced::time; +use iced::window; use iced::{ Align, Application, Checkbox, Clipboard, Column, Command, Container, Element, Length, Row, Settings, Subscription, Text, @@ -19,6 +20,10 @@ use std::time::{Duration, Instant}; pub fn main() -> iced::Result { GameOfLife::run(Settings { antialiasing: true, + window: window::Settings { + position: window::Position::Centered, + ..window::Settings::default() + }, ..Settings::default() }) } |