FilmCraft: An open-source, nonlinear video editor written by scratch in pure Rust
Windows: platform modifier names in status-bar and mask hints
Tom0bf83a27c0f6
diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rsindex 461aa36ea..6a1b7a617 100644--- a/crates/ui-egui/src/lib.rs+++ b/crates/ui-egui/src/lib.rs@@ -1321,8 +1321,10 @@ impl FilmcraftApp {/// Contextual hint for the status bar (Premiere shows tool/gesture hints here).fn hint_text(&self) -> String {+ let mac = cfg!(target_os = "macos");match self.ui.tool {- state::Tool::Selection => "Click to select, or click in empty space and drag to marquee select. Use Shift, Opt, and Cmd for other options.",+ state::Tool::Selection if mac => "Click to select, or click in empty space and drag to marquee select. Use Shift, Opt, and Cmd for other options.",+ state::Tool::Selection => "Click to select, or click in empty space and drag to marquee select. Use Shift, Alt, and Ctrl for other options.",state::Tool::TrackSelectForward => "Click to select all clips to the right in all tracks. Shift-click for a single track.",state::Tool::TrackSelectBackward => "Click to select all clips to the left in all tracks. Shift-click for a single track.",state::Tool::Ripple => "Drag an edit point to ripple trim; later clips move to keep the gap closed.",@@ -1333,7 +1335,8 @@ impl FilmcraftApp {state::Tool::Slip => "Drag a clip to slip its source in/out without moving it.",state::Tool::Slide => "Drag a clip to slide it between its neighbours.",state::Tool::Hand => "Drag to scroll the timeline.",- state::Tool::Zoom => "Click to zoom in; Opt-click to zoom out.",+ state::Tool::Zoom if mac => "Click to zoom in; Opt-click to zoom out.",+ state::Tool::Zoom => "Click to zoom in; Alt-click to zoom out.",_ => "",}.to_string()diff --git a/crates/ui-egui/src/panels/masks.rs b/crates/ui-egui/src/panels/masks.rsindex 86893f61f..c7a959372 100644--- a/crates/ui-egui/src/panels/masks.rs+++ b/crates/ui-egui/src/panels/masks.rs@@ -359,9 +359,11 @@ pub fn monitor_overlay(app: &mut FilmcraftApp, ui: &mut egui::Ui, pic: Rect, fralet selected = sel_v == Some(i);painter.rect_filled(vr, 0.0, if selected { col } else { Color32::WHITE });painter.rect_stroke(vr, 0.0, Stroke::new(1.0, col), egui::StrokeKind::Middle);- let r = ui- .interact(vr.expand(3.0), egui::Id::new(("mask-vertex", i)), Sense::click_and_drag())- .on_hover_text("Drag: move · Alt-click: smooth/corner · Cmd-click: delete");+ let r = ui.interact(vr.expand(3.0), egui::Id::new(("mask-vertex", i)), Sense::click_and_drag()).on_hover_text(if cfg!(target_os = "macos") {+ "Drag: move · Alt-click: smooth/corner · Cmd-click: delete"+ } else {+ "Drag: move · Alt-click: smooth/corner · Ctrl-click: delete"+ });app.auto.add(&format!("program.mask.vertex.{i}"), vr, "Mask vertex");if r.drag_started() {ui.data_mut(|d| d.insert_temp(sel_v_id, i));