瀏覽代碼

added toolbar icons to DefaultIconRegistry

telamonian 5 年之前
父節點
當前提交
baa37b0a7b

+ 17 - 1
packages/ui-components/src/icon/iconimports.ts

@@ -31,6 +31,14 @@ import lineFormSvg from '../../style/icons/statusbar/line-form.svg';
 import notTrustedSvg from '../../style/icons/statusbar/not-trusted.svg';
 import terminalSvg from '../../style/icons/statusbar/terminal.svg';
 import trustedSvg from '../../style/icons/statusbar/trusted.svg';
+import addSvg from '../../style/icons/toolbar/add.svg';
+import copySvg from '../../style/icons/toolbar/copy.svg';
+import cutSvg from '../../style/icons/toolbar/cut.svg';
+import pasteSvg from '../../style/icons/toolbar/paste.svg';
+import refreshSvg from '../../style/icons/toolbar/refresh.svg';
+import runSvg from '../../style/icons/toolbar/run.svg';
+import saveSvg from '../../style/icons/toolbar/save.svg';
+import stopSvg from '../../style/icons/toolbar/stop.svg';
 
 // defaultIcons definition
 export namespace IconImports {
@@ -57,6 +65,14 @@ export namespace IconImports {
     { name: 'line-form', svg: lineFormSvg },
     { name: 'not-trusted', svg: notTrustedSvg },
     { name: 'terminal', svg: terminalSvg },
-    { name: 'trusted', svg: trustedSvg }
+    { name: 'trusted', svg: trustedSvg },
+    { name: 'add', svg: addSvg },
+    { name: 'copy', svg: copySvg },
+    { name: 'cut', svg: cutSvg },
+    { name: 'paste', svg: pasteSvg },
+    { name: 'refresh', svg: refreshSvg },
+    { name: 'run', svg: runSvg },
+    { name: 'save', svg: saveSvg },
+    { name: 'stop', svg: stopSvg }
   ];
 }

+ 32 - 0
packages/ui-components/style/deprecated.css

@@ -35,6 +35,14 @@
   --jp-icon-not-trusted: url('icons/statusbar/not-trusted.svg');
   --jp-icon-terminal: url('icons/statusbar/terminal.svg');
   --jp-icon-trusted: url('icons/statusbar/trusted.svg');
+  --jp-icon-add: url('icons/toolbar/add.svg');
+  --jp-icon-copy: url('icons/toolbar/copy.svg');
+  --jp-icon-cut: url('icons/toolbar/cut.svg');
+  --jp-icon-paste: url('icons/toolbar/paste.svg');
+  --jp-icon-refresh: url('icons/toolbar/refresh.svg');
+  --jp-icon-run: url('icons/toolbar/run.svg');
+  --jp-icon-save: url('icons/toolbar/save.svg');
+  --jp-icon-stop: url('icons/toolbar/stop.svg');
 }
 
 /* Icon CSS class declarations */
@@ -108,3 +116,27 @@
 .jp-TrustedIcon {
   background-image: var(--jp-icon-trusted);
 }
+.jp-AddIcon {
+  background-image: var(--jp-icon-add);
+}
+.jp-CopyIcon {
+  background-image: var(--jp-icon-copy);
+}
+.jp-CutIcon {
+  background-image: var(--jp-icon-cut);
+}
+.jp-PasteIcon {
+  background-image: var(--jp-icon-paste);
+}
+.jp-RefreshIcon {
+  background-image: var(--jp-icon-refresh);
+}
+.jp-RunIcon {
+  background-image: var(--jp-icon-run);
+}
+.jp-SaveIcon {
+  background-image: var(--jp-icon-save);
+}
+.jp-StopIcon {
+  background-image: var(--jp-icon-stop);
+}

+ 5 - 1
packages/ui-components/style/icons/toolbar/add.svg

@@ -1 +1,5 @@
-<svg xmlns="http://www.w3.org/2000/svg" fill="#616161" width="24" height="24" viewBox="0 0 24 24"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/></svg>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
+    <g class="jp-icon3" fill="#616161">
+        <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/>
+    </g>
+</svg>

+ 6 - 4
packages/ui-components/style/icons/toolbar/copy.svg

@@ -1,6 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
-<svg fill="#616161" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 18 18">
-    <path fill="none" d="M0,0h18v18H0V0z"/>
-    <path d="M11.9,1H3.2C2.4,1,1.7,1.7,1.7,2.5v10.2h1.5V2.5h8.7V1z M14.1,3.9h-8c-0.8,0-1.5,0.7-1.5,1.5v10.2c0,0.8,0.7,1.5,1.5,1.5h8
-        c0.8,0,1.5-0.7,1.5-1.5V5.4C15.5,4.6,14.9,3.9,14.1,3.9z M14.1,15.5h-8V5.4h8V15.5z"/>
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 18 18">
+    <g class="jp-icon3" fill="#616161">
+        <path fill="none" d="M0,0h18v18H0V0z"/>
+        <path d="M11.9,1H3.2C2.4,1,1.7,1.7,1.7,2.5v10.2h1.5V2.5h8.7V1z M14.1,3.9h-8c-0.8,0-1.5,0.7-1.5,1.5v10.2c0,0.8,0.7,1.5,1.5,1.5h8
+            c0.8,0,1.5-0.7,1.5-1.5V5.4C15.5,4.6,14.9,3.9,14.1,3.9z M14.1,15.5h-8V5.4h8V15.5z"/>
+    </g>
 </svg>

+ 8 - 6
packages/ui-components/style/icons/toolbar/cut.svg

@@ -1,7 +1,9 @@
-<svg fill="#616161" height="18" viewBox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg">
-    <path d="M0 0h24v24H0z" fill="none"/>
-    <circle cx="6" cy="18" fill="none" r="2"/>
-    <circle cx="12" cy="12" fill="none" r=".5"/>
-    <circle cx="6" cy="6" fill="none" r="2"/>
-    <path d="M9.64 7.64c.23-.5.36-1.05.36-1.64 0-2.21-1.79-4-4-4S2 3.79 2 6s1.79 4 4 4c.59 0 1.14-.13 1.64-.36L10 12l-2.36 2.36C7.14 14.13 6.59 14 6 14c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4c0-.59-.13-1.14-.36-1.64L12 14l7 7h3v-1L9.64 7.64zM6 8c-1.1 0-2-.89-2-2s.9-2 2-2 2 .89 2 2-.9 2-2 2zm0 12c-1.1 0-2-.89-2-2s.9-2 2-2 2 .89 2 2-.9 2-2 2zm6-7.5c-.28 0-.5-.22-.5-.5s.22-.5.5-.5.5.22.5.5-.22.5-.5.5zM19 3l-6 6 2 2 7-7V3z"/>
+<svg height="18" viewBox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg">
+    <g class="jp-icon3" fill="#616161">
+        <path d="M0 0h24v24H0z" fill="none"/>
+        <circle cx="6" cy="18" fill="none" r="2"/>
+        <circle cx="12" cy="12" fill="none" r=".5"/>
+        <circle cx="6" cy="6" fill="none" r="2"/>
+        <path d="M9.64 7.64c.23-.5.36-1.05.36-1.64 0-2.21-1.79-4-4-4S2 3.79 2 6s1.79 4 4 4c.59 0 1.14-.13 1.64-.36L10 12l-2.36 2.36C7.14 14.13 6.59 14 6 14c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4c0-.59-.13-1.14-.36-1.64L12 14l7 7h3v-1L9.64 7.64zM6 8c-1.1 0-2-.89-2-2s.9-2 2-2 2 .89 2 2-.9 2-2 2zm0 12c-1.1 0-2-.89-2-2s.9-2 2-2 2 .89 2 2-.9 2-2 2zm6-7.5c-.28 0-.5-.22-.5-.5s.22-.5.5-.5.5.22.5.5-.22.5-.5.5zM19 3l-6 6 2 2 7-7V3z"/>
+    </g>
 </svg>

+ 5 - 3
packages/ui-components/style/icons/toolbar/paste.svg

@@ -1,4 +1,6 @@
-<svg fill="#616161" height="18" viewBox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg">
-    <path d="M19 2h-4.18C14.4.84 13.3 0 12 0c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm7 18H5V4h2v3h10V4h2v16z"/>
-    <path d="M0 0h24v24H0z" fill="none"/>
+<svg height="18" viewBox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg">
+    <g class="jp-icon3" fill="#616161">
+        <path d="M19 2h-4.18C14.4.84 13.3 0 12 0c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm7 18H5V4h2v3h10V4h2v16z"/>
+        <path d="M0 0h24v24H0z" fill="none"/>
+    </g>
 </svg>

+ 5 - 1
packages/ui-components/style/icons/toolbar/refresh.svg

@@ -1 +1,5 @@
-<svg xmlns="http://www.w3.org/2000/svg" fill="#616161" width="18" height="18" viewBox="0 0 18 18"><path d="M9 13.5c-2.49 0-4.5-2.01-4.5-4.5S6.51 4.5 9 4.5c1.24 0 2.36.52 3.17 1.33L10 8h5V3l-1.76 1.76C12.15 3.68 10.66 3 9 3 5.69 3 3.01 5.69 3.01 9S5.69 15 9 15c2.97 0 5.43-2.16 5.9-5h-1.52c-.46 2-2.24 3.5-4.38 3.5z"/></svg>
+<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
+    <g class="jp-icon3" fill="#616161">
+        <path d="M9 13.5c-2.49 0-4.5-2.01-4.5-4.5S6.51 4.5 9 4.5c1.24 0 2.36.52 3.17 1.33L10 8h5V3l-1.76 1.76C12.15 3.68 10.66 3 9 3 5.69 3 3.01 5.69 3.01 9S5.69 15 9 15c2.97 0 5.43-2.16 5.9-5h-1.52c-.46 2-2.24 3.5-4.38 3.5z"/>
+    </g>
+</svg>

+ 5 - 3
packages/ui-components/style/icons/toolbar/run.svg

@@ -1,4 +1,6 @@
-<svg fill="#616161" height="18" viewBox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg">
-    <path d="M8 5v14l11-7z"/>
-    <path d="M0 0h24v24H0z" fill="none"/>
+<svg height="18" viewBox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg">
+    <g class="jp-icon3" fill="#616161">
+        <path d="M8 5v14l11-7z"/>
+        <path d="M0 0h24v24H0z" fill="none"/>
+    </g>
 </svg>

+ 5 - 3
packages/ui-components/style/icons/toolbar/save.svg

@@ -1,4 +1,6 @@
-<svg fill="#616161" height="18" viewBox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg">
-    <path d="M0 0h24v24H0z" fill="none"/>
-    <path d="M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z"/>
+<svg height="18" viewBox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg">
+    <g class="jp-icon3" fill="#616161">
+        <path d="M0 0h24v24H0z" fill="none"/>
+        <path d="M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z"/>
+    </g>
 </svg>

+ 5 - 3
packages/ui-components/style/icons/toolbar/stop.svg

@@ -1,4 +1,6 @@
-<svg fill="#616161" height="18" viewBox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg">
-    <path d="M0 0h24v24H0z" fill="none"/>
-    <path d="M6 6h12v12H6z"/>
+<svg height="18" viewBox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg">
+    <g class="jp-icon3" fill="#616161">
+        <path d="M0 0h24v24H0z" fill="none"/>
+        <path d="M6 6h12v12H6z"/>
+    </g>
 </svg>