Disable maximize window button if Settings::resizable is false
This commit is contained in:
parent
3ec5ad4225
commit
c07315b84e
1 changed files with 6 additions and 0 deletions
|
|
@ -130,6 +130,12 @@ impl Window {
|
|||
.with_title(title)
|
||||
.with_inner_size(winit::dpi::LogicalSize { width, height })
|
||||
.with_resizable(self.resizable)
|
||||
.with_enabled_buttons(if self.resizable {
|
||||
winit::window::WindowButtons::all()
|
||||
} else {
|
||||
winit::window::WindowButtons::CLOSE
|
||||
| winit::window::WindowButtons::MINIMIZE
|
||||
})
|
||||
.with_decorations(self.decorations)
|
||||
.with_transparent(self.transparent)
|
||||
.with_window_icon(self.icon.and_then(conversion::icon))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue