diff options
| author | 2024-06-20 18:35:10 +0200 | |
|---|---|---|
| committer | 2024-06-20 18:35:10 +0200 | |
| commit | 0785b334e79d8f973c96b86608823f54afdf93c4 (patch) | |
| tree | b216ed35a59e9129dfa749de3e19cc2165bef0bb | |
| parent | 3334cf670b09ee2ef0d06c9005677e024050f121 (diff) | |
| download | iced-0785b334e79d8f973c96b86608823f54afdf93c4.tar.gz iced-0785b334e79d8f973c96b86608823f54afdf93c4.tar.bz2 iced-0785b334e79d8f973c96b86608823f54afdf93c4.zip | |
Add `window` method to `Application`
| -rw-r--r-- | src/application.rs | 9 | 
1 files changed, 8 insertions, 1 deletions
| diff --git a/src/application.rs b/src/application.rs index 7b292e23..5d16b40f 100644 --- a/src/application.rs +++ b/src/application.rs @@ -212,6 +212,13 @@ impl<P: Program> Application<P> {          self      } +    /// Sets the [`window::Settings`] of the [`Application`]. +    /// +    /// Overwrites any previous [`window::Settings`]. +    pub fn window(self, window: window::Settings) -> Self { +        Self { window, ..self } +    } +      /// Sets the [`window::Settings::position`] to [`window::Position::Centered`] in the [`Application`].      pub fn centered(self) -> Self {          Self { @@ -288,7 +295,7 @@ impl<P: Program> Application<P> {              ..self          }      } -     +      /// Sets the [`window::Settings::level`] of the [`Application`].      pub fn level(self, level: window::Level) -> Self {          Self { | 
