|
@@ -2476,8 +2476,8 @@ fn on_window_close<'a>(
|
|
|
fn center_window(window: &Window, window_size: WryPhysicalSize<u32>) -> Result<()> {
|
|
|
if let Some(monitor) = window.current_monitor() {
|
|
|
let screen_size = monitor.size();
|
|
|
- let x = (screen_size.width - window_size.width) / 2;
|
|
|
- let y = (screen_size.height - window_size.height) / 2;
|
|
|
+ let x = (screen_size.width as i32 - window_size.width as i32) / 2;
|
|
|
+ let y = (screen_size.height as i32 - window_size.height as i32) / 2;
|
|
|
window.set_outer_position(WryPhysicalPosition::new(x, y));
|
|
|
Ok(())
|
|
|
} else {
|