Merge pull request #2124 from iced-rs/disable-maximize-button
Disable maximize window button if `Settings::resizable` is `false`
This commit is contained in:
commit
751ea77c29
1 changed files with 6 additions and 0 deletions
|
|
@ -134,6 +134,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