window tasks for setting min and max size
This commit is contained in:
parent
ca8aaf9b8d
commit
8ebbfa9767
2 changed files with 36 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue