From 97f1f3dcf4af8325fd24fbd70c13dbde307fce72 Mon Sep 17 00:00:00 2001 From: hatoo Date: Mon, 2 Dec 2019 21:57:07 +0900 Subject: Modify src/settings.rs to keep original API --- src/settings.rs | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) (limited to 'src/settings.rs') diff --git a/src/settings.rs b/src/settings.rs index a5820d87..bd13dcaa 100644 --- a/src/settings.rs +++ b/src/settings.rs @@ -19,12 +19,6 @@ pub struct Window { /// Whether the window should be resizable or not. pub resizable: bool, - - /// Whether the window should have a border, a title bar, etc. - pub decorations: bool, - - /// Platform specific Setting. - pub platform_specific: iced_winit::settings::PlatformSpecific, } impl Default for Window { @@ -32,8 +26,6 @@ impl Default for Window { Window { size: (1024, 768), resizable: true, - decorations: true, - platform_specific: Default::default(), } } } @@ -41,13 +33,9 @@ impl Default for Window { #[cfg(not(target_arch = "wasm32"))] impl From for iced_winit::Settings { fn from(settings: Settings) -> iced_winit::Settings { - iced_winit::Settings { - window: iced_winit::settings::Window { - size: settings.window.size, - resizable: settings.window.resizable, - decorations: settings.window.decorations, - platform_specific: settings.window.platform_specific, - }, - } + let mut iced_winit_settings = iced_winit::settings::Settings::default(); + iced_winit_settings.window.size = settings.window.size; + iced_winit_settings.window.resizable = settings.window.resizable; + iced_winit_settings } } -- cgit