Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Platform specific window options. #1730

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ pub mod icon;

pub use icon::Icon;
pub use position::Position;
pub use settings::Settings;
pub use settings::{PlatformSpecific, Settings};

pub use crate::runtime::window::*;
8 changes: 7 additions & 1 deletion src/window/settings.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use crate::window::{Icon, Position};

pub use iced_winit::settings::PlatformSpecific;

/// The window settings of an application.
#[derive(Debug, Clone)]
pub struct Settings {
Expand Down Expand Up @@ -32,6 +34,9 @@ pub struct Settings {

/// The icon of the window.
pub icon: Option<Icon>,

/// Platform specific settings.
pub platform_specific: PlatformSpecific,
}

impl Default for Settings {
Expand All @@ -47,6 +52,7 @@ impl Default for Settings {
transparent: false,
always_on_top: false,
icon: None,
platform_specific: Default::default(),
}
}
}
Expand All @@ -64,7 +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: Default::default(),
platform_specific: settings.platform_specific,
}
}
}