diff --git a/packages/js-draw/src/toolbar/IconProvider.ts b/packages/js-draw/src/toolbar/IconProvider.ts index 3f5c33a9..1d331831 100644 --- a/packages/js-draw/src/toolbar/IconProvider.ts +++ b/packages/js-draw/src/toolbar/IconProvider.ts @@ -793,7 +793,13 @@ export default class IconProvider { `); } - /** Unused. @deprecated */ + public makeCopyIcon(): IconElemType { + return this.makeIconFromPath(` + M 45,10 45,55 90,55 90,10 45,10 z + M 10,25 10,90 70,90 70,60 40,60 40,25 10,25 z + `); + } + public makePasteIcon(): IconElemType { const icon = this.makeIconFromPath(` M 50 0 L 50 5 L 35 5 L 40 24.75 L 20 25 L 20 100 L 85 100 L 100 90 L 100 24 L 75.1 24.3 L 80 5 L 65 5 L 65 0 L 50 0 z diff --git a/packages/js-draw/src/tools/SelectionTool/SelectionTool.ts b/packages/js-draw/src/tools/SelectionTool/SelectionTool.ts index deef5017..9ca501cf 100644 --- a/packages/js-draw/src/tools/SelectionTool/SelectionTool.ts +++ b/packages/js-draw/src/tools/SelectionTool/SelectionTool.ts @@ -120,14 +120,14 @@ export default class SelectionTool extends BaseTool { }, }, { text: 'Copy to clipboard', // TODO: localize - icon: () => this.editor.icons.makeDuplicateSelectionIcon(), + icon: () => this.editor.icons.makeCopyIcon(), key: async () => { const clipboardHandler = new ClipboardHandler(this.editor); await clipboardHandler.copy(); }, }] : [{ text: 'Paste', // TODO: Localize - icon: () => this.editor.icons.makeSelectionIcon(), + icon: () => this.editor.icons.makePasteIcon(), key: async () => { const clipboardHandler = new ClipboardHandler(this.editor); await clipboardHandler.paste(); diff --git a/packages/material-icons/src/icons/ContentPaste.svg b/packages/material-icons/src/icons/ContentPaste.svg new file mode 100644 index 00000000..640954d4 --- /dev/null +++ b/packages/material-icons/src/icons/ContentPaste.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/material-icons/src/lib.ts b/packages/material-icons/src/lib.ts index 7866173c..0d2bbce9 100644 --- a/packages/material-icons/src/lib.ts +++ b/packages/material-icons/src/lib.ts @@ -59,6 +59,7 @@ import Close from './icons/Close.svg'; import Shapes from './icons/Shapes.svg'; import Draw from './icons/Draw.svg'; import InkPen from './icons/InkPen.svg'; +import ContentPaste from './icons/ContentPaste.svg'; const icon = (data: string) => { const icon = document.createElement('div'); @@ -162,6 +163,12 @@ class MaterialIconProvider extends IconProvider { public override makeDuplicateSelectionIcon(): IconElemType { return icon(ContentCopy); } + public override makeCopyIcon(): IconElemType { + return icon(ContentCopy); + } + public override makePasteIcon(): IconElemType { + return icon(ContentPaste); + } public override makeDeleteSelectionIcon(): IconElemType { return icon(Delete); }