Copy, cut, paste and duplicate on the timeline's bar
The edit menu went, and with it the only way to reach the clipboard without a keyboard, which a phone does not have. They are icons in the selection group: copy, cut and duplicate while something is selected, paste while something is copied. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011FLuCjp9kNH6ovwJVXSbq9
This commit is contained in:
parent
34956dc3c1
commit
c4040c789c
2 changed files with 24 additions and 1 deletions
|
|
@ -65,7 +65,15 @@
|
||||||
;; A new drawing in a lane: a sheet, with a line on it — the one at the
|
;; A new drawing in a lane: a sheet, with a line on it — the one at the
|
||||||
;; playhead carried on — or bare.
|
;; playhead carried on — or bare.
|
||||||
:drawing {:stroke ["M3 1.5h4.5l2 2v7h-6.5z" "M4.6 7.8 5.9 6.1 7.4 7.3"]}
|
:drawing {:stroke ["M3 1.5h4.5l2 2v7h-6.5z" "M4.6 7.8 5.9 6.1 7.4 7.3"]}
|
||||||
:blank {:stroke ["M3 1.5h4.5l2 2v7h-6.5z"]}})
|
:blank {:stroke ["M3 1.5h4.5l2 2v7h-6.5z"]}
|
||||||
|
;; The clipboard, as every editor draws it: two sheets, scissors, a board,
|
||||||
|
;; and two sheets with one more.
|
||||||
|
:copy {:stroke ["M4.5 4.5h5v5h-5z" "M2.5 7.5v-5h5"]}
|
||||||
|
:cut {:stroke ["M2 9a1.5 1.5 0 1 0 3 0a1.5 1.5 0 1 0 -3 0"
|
||||||
|
"M7 9a1.5 1.5 0 1 0 3 0a1.5 1.5 0 1 0 -3 0"
|
||||||
|
"M4.4 7.8 8.5 2" "M7.6 7.8 3.5 2"]}
|
||||||
|
:paste {:stroke ["M3.8 2.5H2.5v8h7v-8H8.2" "M4.5 1.5h3v2h-3z"]}
|
||||||
|
:duplicate {:stroke ["M4.5 4.5h5v5h-5z" "M2.5 7.5v-5h5" "M7 5.8v2.4" "M5.8 7h2.4"]}})
|
||||||
|
|
||||||
(defn view
|
(defn view
|
||||||
"The glyph named `k`, sized by CSS and inked in `currentColor` — so a button's
|
"The glyph named `k`, sized by CSS and inked in `currentColor` — so a button's
|
||||||
|
|
|
||||||
|
|
@ -605,6 +605,7 @@
|
||||||
here @(rf/subscribe [::here])
|
here @(rf/subscribe [::here])
|
||||||
marks @(rf/subscribe [::playback/range])
|
marks @(rf/subscribe [::playback/range])
|
||||||
selections @(rf/subscribe [::sub/selections])
|
selections @(rf/subscribe [::sub/selections])
|
||||||
|
clipboard @(rf/subscribe [::sub/clipboard])
|
||||||
;; A peg goes over ONE node: it takes that node's place in the
|
;; A peg goes over ONE node: it takes that node's place in the
|
||||||
;; hierarchy, and there is no one place a pair of them would go.
|
;; hierarchy, and there is no one place a pair of them would go.
|
||||||
one-node (when (= 1 (count selections))
|
one-node (when (= 1 (count selections))
|
||||||
|
|
@ -698,6 +699,20 @@
|
||||||
(when cuttable?
|
(when cuttable?
|
||||||
[:button {:title "split the selected clip at the playhead"
|
[:button {:title "split the selected clip at the playhead"
|
||||||
:on-click (act [::ui/split])} "split"])
|
:on-click (act [::ui/split])} "split"])
|
||||||
|
;; THE CLIPBOARD, which has keys everywhere but a phone. Copy, cut and
|
||||||
|
;; duplicate while something is selected, paste while something is
|
||||||
|
;; copied.
|
||||||
|
(when (seq selections)
|
||||||
|
[:<>
|
||||||
|
[:button.ico {:aria-label "copy" :title "copy (⌘C)"
|
||||||
|
:on-click (act [::ui/copy])} [icon/view :copy]]
|
||||||
|
[:button.ico {:aria-label "cut" :title "cut (⌘X)"
|
||||||
|
:on-click (act [::ui/cut])} [icon/view :cut]]
|
||||||
|
[:button.ico {:aria-label "duplicate" :title "duplicate beside it (⌘D)"
|
||||||
|
:on-click (act [::ui/duplicate])} [icon/view :duplicate]]])
|
||||||
|
(when clipboard
|
||||||
|
[:button.ico {:aria-label "paste" :title "paste at the playhead (⌘V)"
|
||||||
|
:on-click (act [::ui/paste])} [icon/view :paste]])
|
||||||
(when (and one-node (not lane?))
|
(when (and one-node (not lane?))
|
||||||
;; The only way to keep a pivot, and the only way to transform a
|
;; The only way to keep a pivot, and the only way to transform a
|
||||||
;; measured part by hand — which is what `gesture/refusal` tells you
|
;; measured part by hand — which is what `gesture/refusal` tells you
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue