summaryrefslogtreecommitdiffstats
path: root/src/settings.rs
diff options
context:
space:
mode:
authorLibravatar hatoo <hato2000@gmail.com>2019-12-02 21:57:07 +0900
committerLibravatar hatoo <hato2000@gmail.com>2019-12-02 21:57:07 +0900
commit97f1f3dcf4af8325fd24fbd70c13dbde307fce72 (patch)
tree0290876fa326b80cba4b717ebcb98fb984a05bc1 /src/settings.rs
parenta1f9be3089536681324c1a5233c3a58f47367b9f (diff)
downloadiced-97f1f3dcf4af8325fd24fbd70c13dbde307fce72.tar.gz
iced-97f1f3dcf4af8325fd24fbd70c13dbde307fce72.tar.bz2
iced-97f1f3dcf4af8325fd24fbd70c13dbde307fce72.zip
Modify src/settings.rs to keep original API
Diffstat (limited to 'src/settings.rs')
-rw-r--r--src/settings.rs20
1 files changed, 4 insertions, 16 deletions
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<Settings> 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
}
}