Re-export settings::PlatformSpecific from iced_winit directly
This commit is contained in:
parent
ed7b613804
commit
4405a3d483
3 changed files with 3 additions and 42 deletions
|
|
@ -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<Icon>,
|
||||
|
||||
/// Platform specific settings.
|
||||
pub platform_specific: platform::PlatformSpecific,
|
||||
pub platform_specific: PlatformSpecific,
|
||||
}
|
||||
|
||||
impl Default for Settings {
|
||||
|
|
@ -78,9 +70,7 @@ impl From<Settings> 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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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<PlatformSpecific> 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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
/// The platform specific window settings of an application.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
|
||||
pub struct PlatformSpecific;
|
||||
|
||||
impl From<PlatformSpecific> for iced_winit::settings::PlatformSpecific {
|
||||
fn from(_: PlatformSpecific) -> Self {
|
||||
Default::default()
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue