Merge pull request #2627 from bbb651/more-window-settings

Add `maximized` and `fullscreen` to `window::Settings`
This commit is contained in:
Héctor 2025-01-06 23:05:32 +01:00 committed by GitHub
commit 634365564e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 14 additions and 0 deletions

View file

@ -23,6 +23,12 @@ pub fn window_attributes(
width: settings.size.width,
height: settings.size.height,
})
.with_maximized(settings.maximized)
.with_fullscreen(
settings
.fullscreen
.then_some(winit::window::Fullscreen::Borderless(None)),
)
.with_resizable(settings.resizable)
.with_enabled_buttons(if settings.resizable {
winit::window::WindowButtons::all()