From 4405a3d483286faf962930ca3b294b34f86bd2f4 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Tue, 14 Mar 2023 11:22:06 +0100 Subject: Re-export `settings::PlatformSpecific` from `iced_winit` directly --- src/window/settings.rs | 16 +++------------- src/window/settings/macos.rs | 20 -------------------- src/window/settings/other.rs | 9 --------- 3 files changed, 3 insertions(+), 42 deletions(-) delete mode 100644 src/window/settings/macos.rs delete mode 100644 src/window/settings/other.rs (limited to 'src') diff --git a/src/window/settings.rs b/src/window/settings.rs index a039e213..3c8da62f 100644 --- a/src/window/settings.rs +++ b/src/window/settings.rs @@ -1,14 +1,6 @@ use crate::window::{Icon, Position}; -#[cfg(target_os = "macos")] -#[path = "settings/macos.rs"] -mod platform; - -#[cfg(not(target_os = "macos"))] -#[path = "settings/other.rs"] -mod platform; - -pub use platform::PlatformSpecific; +pub use iced_winit::settings::PlatformSpecific; /// The window settings of an application. #[derive(Debug, Clone)] @@ -44,7 +36,7 @@ pub struct Settings { pub icon: Option, /// Platform specific settings. - pub platform_specific: platform::PlatformSpecific, + pub platform_specific: PlatformSpecific, } impl Default for Settings { @@ -78,9 +70,7 @@ impl From for iced_winit::settings::Window { transparent: settings.transparent, always_on_top: settings.always_on_top, icon: settings.icon.map(Icon::into), - platform_specific: iced_winit::settings::PlatformSpecific::from( - settings.platform_specific, - ), + platform_specific: settings.platform_specific, } } } diff --git a/src/window/settings/macos.rs b/src/window/settings/macos.rs deleted file mode 100644 index c08020cf..00000000 --- a/src/window/settings/macos.rs +++ /dev/null @@ -1,20 +0,0 @@ -/// The platform specific window settings of an application. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] -pub struct PlatformSpecific { - /// Hides the window title. - pub title_hidden: bool, - /// Makes the titlebar transparent and allows the content to appear behind it. - pub titlebar_transparent: bool, - /// Makes the window content appear behind the titlebar. - pub fullsize_content_view: bool, -} - -impl From for iced_winit::settings::PlatformSpecific { - fn from(platform_specific: PlatformSpecific) -> Self { - Self { - title_hidden: platform_specific.title_hidden, - titlebar_transparent: platform_specific.titlebar_transparent, - fullsize_content_view: platform_specific.fullsize_content_view, - } - } -} diff --git a/src/window/settings/other.rs b/src/window/settings/other.rs deleted file mode 100644 index 943d9f0d..00000000 --- a/src/window/settings/other.rs +++ /dev/null @@ -1,9 +0,0 @@ -/// The platform specific window settings of an application. -#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] -pub struct PlatformSpecific; - -impl From for iced_winit::settings::PlatformSpecific { - fn from(_: PlatformSpecific) -> Self { - Default::default() - } -} -- cgit