Skip to content

Commit d7fffaa

Browse files
authored
Merge pull request #1730 from casperstorm/feat/platform-specific-window-options
Platform specific `window` options.
2 parents de4ae51 + 4405a3d commit d7fffaa

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/window.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ pub mod icon;
66

77
pub use icon::Icon;
88
pub use position::Position;
9-
pub use settings::Settings;
9+
pub use settings::{PlatformSpecific, Settings};
1010

1111
pub use crate::runtime::window::*;

src/window/settings.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
use crate::window::{Icon, Position};
22

3+
pub use iced_winit::settings::PlatformSpecific;
4+
35
/// The window settings of an application.
46
#[derive(Debug, Clone)]
57
pub struct Settings {
@@ -32,6 +34,9 @@ pub struct Settings {
3234

3335
/// The icon of the window.
3436
pub icon: Option<Icon>,
37+
38+
/// Platform specific settings.
39+
pub platform_specific: PlatformSpecific,
3540
}
3641

3742
impl Default for Settings {
@@ -47,6 +52,7 @@ impl Default for Settings {
4752
transparent: false,
4853
always_on_top: false,
4954
icon: None,
55+
platform_specific: Default::default(),
5056
}
5157
}
5258
}
@@ -64,7 +70,7 @@ impl From<Settings> for iced_winit::settings::Window {
6470
transparent: settings.transparent,
6571
always_on_top: settings.always_on_top,
6672
icon: settings.icon.map(Icon::into),
67-
platform_specific: Default::default(),
73+
platform_specific: settings.platform_specific,
6874
}
6975
}
7076
}

0 commit comments

Comments
 (0)