diff --git a/Assets/SmallTile.svg b/Assets/SmallTile.svg new file mode 100644 index 00000000000..0fbede335aa --- /dev/null +++ b/Assets/SmallTile.svg @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + SmallTile + Small tile + 2020-04-15 + + diff --git a/Assets/Square150x150Logo.svg b/Assets/Square150x150Logo.svg new file mode 100644 index 00000000000..9cada214b80 --- /dev/null +++ b/Assets/Square150x150Logo.svg @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + Square150x150Logo + Medium tile + 2020-04-15 + + diff --git a/ElectronClient/build-win/Joplin.VisualElementsManifest.xml b/ElectronClient/build-win/Joplin.VisualElementsManifest.xml new file mode 100644 index 00000000000..3b6cfdd9d80 --- /dev/null +++ b/ElectronClient/build-win/Joplin.VisualElementsManifest.xml @@ -0,0 +1,8 @@ + + + diff --git a/ElectronClient/build-win/icons/SmallTile.png b/ElectronClient/build-win/icons/SmallTile.png new file mode 100644 index 00000000000..678f97e452b Binary files /dev/null and b/ElectronClient/build-win/icons/SmallTile.png differ diff --git a/ElectronClient/build-win/icons/Square150x150Logo.png b/ElectronClient/build-win/icons/Square150x150Logo.png new file mode 100644 index 00000000000..aff1ce96e8e Binary files /dev/null and b/ElectronClient/build-win/icons/Square150x150Logo.png differ diff --git a/ElectronClient/package.json b/ElectronClient/package.json index db089bf63f4..56cac8e60d2 100644 --- a/ElectronClient/package.json +++ b/ElectronClient/package.json @@ -44,6 +44,13 @@ "ia32" ] } + ], + "extraFiles": [{ + "from": "build-win/Joplin.VisualElementsManifest.xml", + "to": "." + }], + "extraResources": [ + "build-win/icons/*" ] }, "nsis": { diff --git a/Tools/generate-images.js b/Tools/generate-images.js index 839c68131c9..a8b229d0dff 100644 --- a/Tools/generate-images.js +++ b/Tools/generate-images.js @@ -27,6 +27,10 @@ const sources = [ id: 5, name: 'Joplin.ico', }, + { + id: 6, + name: '../JoplinLetter.png', + }, ]; function sourceById(id) { @@ -250,6 +254,27 @@ const operations = [ width: 144, height: 144, }, + + // ============================================================================ + // Windows tiles + // ============================================================================ + + { + source: 6, + dest: 'ElectronClient/build-win/icons/Square150x150Logo.png', + width: 150, + height: 150, + iconWidth: 99, + iconHeight: 75, + }, + { + source: 6, + dest: 'ElectronClient/build-win/icons/SmallTile.png', + width: 70, + height: 70, + iconWidth: 46, + iconHeight: 46, + }, ]; async function main() { @@ -269,7 +294,20 @@ async function main() { let s = sharp(sourcePath); if (operation.width && operation.height) { - s = s.resize(operation.width, operation.height, { fit: 'fill' }); + if (operation.iconWidth && operation.iconHeight) { + s = s.resize(operation.iconWidth, operation.iconHeight, { + fit: 'contain', + background: { r: 0, g: 0, b: 0, alpha: 0 }, + }).extend({ + top: Math.floor((operation.height - operation.iconHeight) / 2), + bottom: Math.ceil((operation.height - operation.iconHeight) / 2), + left: Math.floor((operation.width - operation.iconWidth) / 2), + right: Math.ceil((operation.width - operation.iconWidth) / 2), + background: { r: 0, g: 0, b: 0, alpha: 0 }, + }); + } else { + s = s.resize(operation.width, operation.height, { fit: 'fill' }); + } } if (destExt === 'jpg') {