Redo has a toolbar button beside undo
Browse files at this commit6dae2b40ea0c16f5be88335cb6cbf4e82d943f49Parent: 9d5ac17- feat
- redo has a toolbar button beside undo
2 changed files +14 -3
crates/app/src/ui/timeline.rsmodified+4 -3
| @@ -64,11 +64,12 @@ impl Player { | ||
| 64 | 64 | &join_detail( |
| 65 | 65 | &self.live_decode(position, state.is_playing()), |
| 66 | 66 | &format!( |
| 67 | - "{} copy · {} paste · {} undo · click the bar to seek · drop a file \ | |
| 68 | - to import", | |
| 67 | + "{} copy · {} paste · {} undo · {} redo · click the bar to seek · \ | |
| 68 | + drop a file to import", | |
| 69 | 69 | key(ActionId::Copy), |
| 70 | 70 | key(ActionId::Paste), |
| 71 | - key(ActionId::Undo) | |
| 71 | + key(ActionId::Undo), | |
| 72 | + key(ActionId::Redo) | |
| 72 | 73 | ), |
| 73 | 74 | ), |
| 74 | 75 | ), |
crates/app/src/ui/toolbar.rsmodified+10 -0
| @@ -337,6 +337,16 @@ impl Player { | ||
| 337 | 337 | ActionId::Undo, |
| 338 | 338 | cx.listener(|this, _: &ClickEvent, _, cx| this.undo(cx)), |
| 339 | 339 | )) |
| 340 | + .child(self.action_control( | |
| 341 | + "redo", | |
| 342 | + 0., | |
| 343 | + BG_RAISED(), | |
| 344 | + None, | |
| 345 | + "Redo", | |
| 346 | + "brings the undone edit back", | |
| 347 | + ActionId::Redo, | |
| 348 | + cx.listener(|this, _: &ClickEvent, _, cx| this.redo(cx)), | |
| 349 | + )) | |
| 340 | 350 | .child(separator()) |
| 341 | 351 | .child(group_label("Track")) |
| 342 | 352 | .child(self.action_control( |