diff --git a/src/draw_thread.rs b/src/draw_thread.rs index 3f98dec..ed187c0 100644 --- a/src/draw_thread.rs +++ b/src/draw_thread.rs @@ -169,9 +169,10 @@ pub(crate) fn spawn_image_thread( status.set_label("Saving..."); win.deactivate(); cont.save(); + status.set_label(""); win.activate(); win.redraw(); - status.set_label(""); + app::awake(); } } DrawMessage::Clone => { @@ -194,6 +195,7 @@ pub(crate) fn spawn_image_thread( status.set_label(""); win.activate(); win.redraw(); + app::awake(); } } DrawMessage::Delete => { @@ -212,6 +214,7 @@ pub(crate) fn spawn_image_thread( status.set_label(""); win.activate(); win.redraw(); + app::awake(); } } } diff --git a/src/utils.rs b/src/utils.rs index 7774d8b..8543d91 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -121,8 +121,8 @@ impl ImageContainer { let (origina_crop_width, origina_crop_height) = croped_ratio(original_width, original_height); prop.crop_position = Some(( - original_width / 2.0 - origina_crop_width / 2.0, - original_height / 2.0 - origina_crop_height / 2.0, + (original_width - origina_crop_width) / 2.0, + (original_height - origina_crop_height) / 2.0, )); let (s_width, s_height): (f64, f64) = Coord::from(self.image.dimensions()).into();