diff options
| author | 2023-10-27 17:38:14 +0200 | |
|---|---|---|
| committer | 2023-10-27 17:38:14 +0200 | |
| commit | 751ea77c29f6eb3d00f45f0a04c833a1d03a425c (patch) | |
| tree | db69880993a75fcb2642db18e116ea8a67e51d07 /winit | |
| parent | d731996342118dccfd50df8db9607741d162a639 (diff) | |
| parent | c07315b84eb59daeb9bbe7480f30dc0937ceca13 (diff) | |
| download | iced-751ea77c29f6eb3d00f45f0a04c833a1d03a425c.tar.gz iced-751ea77c29f6eb3d00f45f0a04c833a1d03a425c.tar.bz2 iced-751ea77c29f6eb3d00f45f0a04c833a1d03a425c.zip | |
Merge pull request #2124 from iced-rs/disable-maximize-button
Disable maximize window button if `Settings::resizable` is `false`
Diffstat (limited to '')
| -rw-r--r-- | winit/src/settings.rs | 6 | 
1 files changed, 6 insertions, 0 deletions
| diff --git a/winit/src/settings.rs b/winit/src/settings.rs index 9d2bfbbc..599f33f1 100644 --- a/winit/src/settings.rs +++ b/winit/src/settings.rs @@ -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)) | 
