macos: set minimum increment size to 1x1 cells

This commit is contained in:
Jeffrey Knockel authored and Wez Furlong committed 2024-01-24 22:04:16 -07:00
1 parent 4546133d35
commit 642bfbb69a
1 file changed
+6
+6
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())
];
}
}