diff options
author | 2021-07-22 17:49:18 +0700 | |
---|---|---|
committer | 2021-07-22 17:49:18 +0700 | |
commit | 9cf5f3e1ef19f67b7939b9a747c2f66ad6b5275c (patch) | |
tree | 4c9af75c3a0b7d0d7a5e664ec55fbdbc24cd9f88 /examples | |
parent | 8fe8b6b168f193fadb495c78c076262d9114b14e (diff) | |
parent | 39b8f7de50ca53c67214c4ec2af2d3a0944f006a (diff) | |
download | iced-9cf5f3e1ef19f67b7939b9a747c2f66ad6b5275c.tar.gz iced-9cf5f3e1ef19f67b7939b9a747c2f66ad6b5275c.tar.bz2 iced-9cf5f3e1ef19f67b7939b9a747c2f66ad6b5275c.zip |
Merge pull request #929 from TimUntersberger/winit-improv
feat: add position to window settings
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 877aa2d2..c3e16e8b 100644 --- a/examples/game_of_life/src/main.rs +++ b/examples/game_of_life/src/main.rs @@ -10,6 +10,7 @@ use iced::menu::{self, Menu}; 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, @@ -20,6 +21,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() }) } |