forge
Explore
Log in

Don't you dare go Hollow

Redo has a toolbar button beside undo

Browse files at this commit

6dae2b40ea0c16f5be88335cb6cbf4e82d943f49Ahmet Kaan GümüşParent: 9d5ac17
  • feat
    • redo has a toolbar button beside undo
Show full message
✨ feat(app): redo has a toolbar button beside undo

The toolbar only exposed undo as a click target, leaving redo
(ctrl+y) reachable by keyboard alone. Add a sibling button and
mention redo in the timeline hint line.
crates/app/src/ui/timeline.rsmodified+4 -3
@@ -64,11 +64,12 @@ impl Player {
64 &join_detail(64 &join_detail(
65 &self.live_decode(position, state.is_playing()),65 &self.live_decode(position, state.is_playing()),
66 &format!(66 &format!(
67- "{} copy · {} paste · {} undo · click the bar to seek · drop a file \67+ "{} copy · {} paste · {} undo · {} redo · click the bar to seek · \
68- to import",68+ drop a file to import",
69 key(ActionId::Copy),69 key(ActionId::Copy),
70 key(ActionId::Paste),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 ActionId::Undo,337 ActionId::Undo,
338 cx.listener(|this, _: &ClickEvent, _, cx| this.undo(cx)),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 .child(separator())350 .child(separator())
341 .child(group_label("Track"))351 .child(group_label("Track"))
342 .child(self.action_control(352 .child(self.action_control(