summaryrefslogtreecommitdiffstats
path: root/winit
diff options
context:
space:
mode:
authorLibravatar JL710 <76447362+JL710@users.noreply.github.com>2024-10-11 12:10:30 +0200
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2025-01-06 23:20:51 +0100
commit8ebbfa9767bcb8f8efd43cc1c7d40e9c61f6c461 (patch)
tree178afbae13d5fd458542b3e2a9457f0268189a84 /winit
parentca8aaf9b8daa3d8b925165fb912af425438d4e79 (diff)
downloadiced-8ebbfa9767bcb8f8efd43cc1c7d40e9c61f6c461.tar.gz
iced-8ebbfa9767bcb8f8efd43cc1c7d40e9c61f6c461.tar.bz2
iced-8ebbfa9767bcb8f8efd43cc1c7d40e9c61f6c461.zip
window tasks for setting min and max size
Diffstat (limited to 'winit')
-rw-r--r--winit/src/program.rs20
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);