Add window::Settings::fullscreen

Corresponds to `winit:🪟:WindowAttributes::with_fullscreen`.

Currently only allows to set `Fullscreen::Borderless(None)` meaning
borderless on the current monitor, exclusive fullscreen does not
make sense for a GUI and iced does not expose monitors yet.
This commit is contained in:
bbb651 2024-10-04 21:20:43 +03:00
parent 13c649881e
commit dd08f98f0e
2 changed files with 9 additions and 0 deletions

View file

@ -24,6 +24,11 @@ pub fn window_attributes(
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()