Step 4 complete: Add CropWidget (444 lines) and crop dialog - Crop feature restored!

This commit is contained in:
wfx 2026-02-04 16:20:08 +01:00
parent 5d729c7495
commit 49bff3dd89
6 changed files with 547 additions and 6 deletions

View file

@ -223,9 +223,11 @@ pub fn update(app: &mut NoctuaApp, msg: &AppMessage) -> UpdateResult {
}
}
}
AppMessage::CropDragMove { x, y, max_x, max_y } => {
AppMessage::CropDragMove { x, y } => {
if app.model.tool_mode == ToolMode::Crop {
app.model.crop_selection.update_drag(*x, *y, *max_x, *max_y);
if let Some((img_w, img_h)) = app.model.current_dimensions {
app.model.crop_selection.update_drag(*x, *y, img_w as f32, img_h as f32);
}
}
}
AppMessage::CropDragEnd => {