1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-27 15:37:29 +03:00

macos: set minimum increment size to 1x1 cells

This commit is contained in:
Jeffrey Knockel 2024-01-24 19:52:51 -05:00 committed by Wez Furlong
parent 4546133d35
commit 642bfbb69a

View File

@ -1257,9 +1257,15 @@ impl WindowInner {
}
fn set_resize_increments(&self, incr: ResizeIncrement) {
let min_width = incr.base_width + incr.x;
let min_height = incr.base_height + incr.y;
unsafe {
self.window
.setResizeIncrements_(NSSize::new(incr.x.into(), incr.y.into()));
let () = msg_send![
*self.window,
setContentMinSize: NSSize::new(min_width.into(), min_height.into())
];
}
}