Skip to content

Commit

Permalink
Merge pull request #1730 from casperstorm/feat/platform-specific-wind…
Browse files Browse the repository at this point in the history
…ow-options

Platform specific `window` options.
  • Loading branch information
hecrj authored Mar 14, 2023
2 parents de4ae51 + 4405a3d commit d7fffaa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
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,
}
}
}

0 comments on commit d7fffaa

Please sign in to comment.