From 9c6c6ee117d3c0e0f634e2bc96b2f0b0df85c028 Mon Sep 17 00:00:00 2001 From: Thaddeus Crews Date: Wed, 22 Jan 2025 15:57:50 -0600 Subject: [PATCH] =?UTF-8?q?feat:=20generate=20icons=20as=2016=C3=9716?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/generator/fileGenerator.ts | 4 ++-- src/core/generator/folderGenerator.ts | 14 ++++++-------- src/core/generator/shared/svg.ts | 2 +- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/core/generator/fileGenerator.ts b/src/core/generator/fileGenerator.ts index 9c66954b7f..27a00773b7 100644 --- a/src/core/generator/fileGenerator.ts +++ b/src/core/generator/fileGenerator.ts @@ -238,11 +238,11 @@ export const generateFileIcons = async ( } const fileIcon = - 'M13 9h5.5L13 3.5V9M6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4c0-1.11.89-2 2-2m5 2H6v16h12v-9h-7V4z'; + 'M9 2v3h3Zm4 2.5V14q0 1-1 1H4q-1 0-1-1V2q0-1 1-1h5.5ZM8 2H4v12h8V6H8Z'; await writeSVGFiles( 'file', - getSVG(getPath(fileIcon, color), 24), + getSVG(getPath(fileIcon, color)), opacity, saturation ); diff --git a/src/core/generator/folderGenerator.ts b/src/core/generator/folderGenerator.ts index c89919e445..e98d5678f0 100644 --- a/src/core/generator/folderGenerator.ts +++ b/src/core/generator/folderGenerator.ts @@ -450,9 +450,9 @@ export const generateFolderIcons = async ( } const folderIcon = - 'M13.84376,7.53645l-1.28749-1.0729A2,2,0,0,0,11.27591,6H4A2,2,0,0,0,2,8V24a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2H15.12412A2,2,0,0,1,13.84376,7.53645Z'; + 'M2 13q-1 0-1-1V4q0-1 1-1h3.5c1 0 1 1 2 1H14q1 0 1 1v7q0 1-1 1Z'; const folderIconOpen = - 'M28.96692,12H9.44152a2,2,0,0,0-1.89737,1.36754L4,24V10H28a2,2,0,0,0-2-2H15.1241a2,2,0,0,1-1.28038-.46357L12.5563,6.46357A2,2,0,0,0,11.27592,6H4A2,2,0,0,0,2,8V24a2,2,0,0,0,2,2H26l4.80523-11.21213A2,2,0,0,0,28.96692,12Z'; + 'M2 13q-1 0-1-1V4q0-1 1-1h3.5c1 0 1 1 2 1H13q1 0 1 1H2v7l2-5q.4-1 1-1h9q1.8 0 1 2l-2 5Z'; await writeSVGFiles( 'folder', @@ -484,20 +484,18 @@ export const generateRootFolderIcons = async ( return logger.error('Invalid color code for root folder icons'); } - const rootFolderIcon = - 'M16,5A11,11,0,1,1,5,16,11.01245,11.01245,0,0,1,16,5m0-3A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,8a6,6,0,1,0,6,6A6,6,0,0,0,16,10Z'; - const rootFolderIconOpen = - 'M16,5A11,11,0,1,1,5,16,11.01245,11.01245,0,0,1,16,5m0-3A14,14,0,1,0,30,16,14,14,0,0,0,16,2Z'; + const rootFolderIconOuter = ``; + const rootFolderIconInner = ``; await writeSVGFiles( 'folder-root', - getSVG(getPath(rootFolderIcon, color)), + getSVG(rootFolderIconOuter + rootFolderIconInner), opacity, saturation ); await writeSVGFiles( 'folder-root-open', - getSVG(getPath(rootFolderIconOpen, color)), + getSVG(rootFolderIconOuter), opacity, saturation ); diff --git a/src/core/generator/shared/svg.ts b/src/core/generator/shared/svg.ts index 5f4d1eea72..101febdd2f 100644 --- a/src/core/generator/shared/svg.ts +++ b/src/core/generator/shared/svg.ts @@ -28,5 +28,5 @@ export const writeSVGFiles = async ( export const getPath = (d: string, color: string) => ``; -export const getSVG = (path: string, viewBoxSize = 32) => +export const getSVG = (path: string, viewBoxSize = 16) => `${path}`;