diff options
| author | 2023-03-14 11:50:18 +0100 | |
|---|---|---|
| committer | 2023-03-14 11:50:18 +0100 | |
| commit | d7fffaa801423ae989fa7693f5b1cb424194e1ff (patch) | |
| tree | 7620887744718bb3b93b707130dea0035d93e007 /src/window | |
| parent | de4ae51e3cc30dc2ee1db1686b98a709f9552f80 (diff) | |
| parent | 4405a3d483286faf962930ca3b294b34f86bd2f4 (diff) | |
| download | iced-d7fffaa801423ae989fa7693f5b1cb424194e1ff.tar.gz iced-d7fffaa801423ae989fa7693f5b1cb424194e1ff.tar.bz2 iced-d7fffaa801423ae989fa7693f5b1cb424194e1ff.zip | |
Merge pull request #1730 from casperstorm/feat/platform-specific-window-options
Platform specific `window` options.
Diffstat (limited to '')
| -rw-r--r-- | src/window.rs | 2 | ||||
| -rw-r--r-- | src/window/settings.rs | 8 | 
2 files changed, 8 insertions, 2 deletions
| diff --git a/src/window.rs b/src/window.rs index 5a199580..aba4bce8 100644 --- a/src/window.rs +++ b/src/window.rs @@ -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::*; diff --git a/src/window/settings.rs b/src/window/settings.rs index 24d0f4f9..3c8da62f 100644 --- a/src/window/settings.rs +++ b/src/window/settings.rs @@ -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 { @@ -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 { @@ -47,6 +52,7 @@ impl Default for Settings {              transparent: false,              always_on_top: false,              icon: None, +            platform_specific: Default::default(),          }      }  } @@ -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,          }      }  } | 
