From 277b848ad8df1e8d038e33707548a45d63a601db Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Mon, 18 Jul 2022 18:37:41 +0200 Subject: Remove `window::Mode` and introduce `Settings::visible` Additionally, only show the window once one frame has been rendered to avoid blank flashes on Windows. --- src/application.rs | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'src/application.rs') diff --git a/src/application.rs b/src/application.rs index 58d4a577..23ce034e 100644 --- a/src/application.rs +++ b/src/application.rs @@ -1,5 +1,4 @@ //! Build interactive cross-platform applications. -use crate::window; use crate::{Command, Element, Executor, Settings, Subscription}; pub use iced_native::application::{Appearance, StyleSheet}; @@ -169,18 +168,6 @@ pub trait Application: Sized { Subscription::none() } - /// Returns the current [`Application`] mode. - /// - /// The runtime will automatically transition your application if a new mode - /// is returned. - /// - /// Currently, the mode only has an effect in native platforms. - /// - /// By default, an application will run in windowed mode. - fn mode(&self) -> window::Mode { - window::Mode::Windowed - } - /// Returns the scale factor of the [`Application`]. /// /// It can be used to dynamically control the size of the UI at runtime @@ -277,14 +264,6 @@ where self.0.style() } - fn mode(&self) -> iced_winit::Mode { - match self.0.mode() { - window::Mode::Windowed => iced_winit::Mode::Windowed, - window::Mode::Fullscreen => iced_winit::Mode::Fullscreen, - window::Mode::Hidden => iced_winit::Mode::Hidden, - } - } - fn subscription(&self) -> Subscription { self.0.subscription() } -- cgit