Add window method to Application

This commit is contained in:
Héctor Ramón Jiménez 2024-06-20 18:35:10 +02:00
parent 3334cf670b
commit 0785b334e7
No known key found for this signature in database
GPG key ID: 7CC46565708259A7

View file

@ -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 {