diff options
| author | 2024-10-11 12:10:30 +0200 | |
|---|---|---|
| committer | 2025-01-06 23:20:51 +0100 | |
| commit | 8ebbfa9767bcb8f8efd43cc1c7d40e9c61f6c461 (patch) | |
| tree | 178afbae13d5fd458542b3e2a9457f0268189a84 /winit/src | |
| parent | ca8aaf9b8daa3d8b925165fb912af425438d4e79 (diff) | |
| download | iced-8ebbfa9767bcb8f8efd43cc1c7d40e9c61f6c461.tar.gz iced-8ebbfa9767bcb8f8efd43cc1c7d40e9c61f6c461.tar.bz2 iced-8ebbfa9767bcb8f8efd43cc1c7d40e9c61f6c461.zip | |
window tasks for setting min and max size
Diffstat (limited to '')
| -rw-r--r-- | winit/src/program.rs | 20 | 
1 files changed, 20 insertions, 0 deletions
| diff --git a/winit/src/program.rs b/winit/src/program.rs index 052b36b0..58fec9df 100644 --- a/winit/src/program.rs +++ b/winit/src/program.rs @@ -1291,6 +1291,26 @@ fn run_action<P, C>(                      );                  }              } +            window::Action::SetMinSize(id, size) => { +                if let Some(window) = window_manager.get_mut(id) { +                    window.raw.set_min_inner_size(size.map(|x| { +                        winit::dpi::LogicalSize { +                            width: x.width, +                            height: x.height, +                        } +                    })); +                } +            } +            window::Action::SetMaxSize(id, size) => { +                if let Some(window) = window_manager.get_mut(id) { +                    window.raw.set_max_inner_size(size.map(|x| { +                        winit::dpi::LogicalSize { +                            width: x.width, +                            height: x.height, +                        } +                    })); +                } +            }              window::Action::ChangeTitle(id, title) => {                  if let Some(window) = window_manager.get_mut(id) {                      window.raw.set_title(&title); | 
