Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
feat(mobile): provide monochrome icon too
Elian Doran07608a041b94
diff --git a/apps/mobile/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/apps/mobile/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xmlindex 036d09bc5f..4df90c3c1e 100644--- a/apps/mobile/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml+++ b/apps/mobile/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml@@ -2,4 +2,5 @@<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"><background android:drawable="@color/ic_launcher_background"/><foreground android:drawable="@mipmap/ic_launcher_foreground"/>+ <monochrome android:drawable="@mipmap/ic_launcher_monochrome"/></adaptive-icon>\ No newline at end of filediff --git a/apps/mobile/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/apps/mobile/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xmlindex 036d09bc5f..4df90c3c1e 100644--- a/apps/mobile/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml+++ b/apps/mobile/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml@@ -2,4 +2,5 @@<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"><background android:drawable="@color/ic_launcher_background"/><foreground android:drawable="@mipmap/ic_launcher_foreground"/>+ <monochrome android:drawable="@mipmap/ic_launcher_monochrome"/></adaptive-icon>\ No newline at end of filediff --git a/apps/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher_monochrome.png b/apps/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher_monochrome.pngnew file mode 100644index 0000000000..31cc9f0e33Binary files /dev/null and b/apps/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher_monochrome.png differdiff --git a/apps/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher_monochrome.png b/apps/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher_monochrome.pngnew file mode 100644index 0000000000..3174e67abdBinary files /dev/null and b/apps/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher_monochrome.png differdiff --git a/apps/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.png b/apps/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.pngnew file mode 100644index 0000000000..a0ac6d4298Binary files /dev/null and b/apps/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.png differdiff --git a/apps/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.png b/apps/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.pngnew file mode 100644index 0000000000..af3c1338edBinary files /dev/null and b/apps/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.png differdiff --git a/apps/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.png b/apps/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.pngnew file mode 100644index 0000000000..f8998ba56aBinary files /dev/null and b/apps/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.png differdiff --git a/scripts/icons/create-icons.sh b/scripts/icons/create-icons.shindex c02cd88bd3..ae320b2abd 100644--- a/scripts/icons/create-icons.sh+++ b/scripts/icons/create-icons.sh@@ -111,6 +111,13 @@ for density in mdpi hdpi xhdpi xxhdpi xxxhdpi; do-extent ${foreground_size}x${foreground_size} "$mipmap_dir/ic_launcher_foreground.png"rm "$mipmap_dir/_tmp_fg.png"+ # Monochrome layer for Android 13+ themed icons. Android ignores RGB and+ # uses only the alpha channel, tinting it with the system theme color.+ inkscape -w $fg_logo -h $fg_logo "$source_icon_dir/icon-black.svg" -o "$mipmap_dir/_tmp_mono.png"+ magick "$mipmap_dir/_tmp_mono.png" -background none -gravity center \+ -extent ${foreground_size}x${foreground_size} "$mipmap_dir/ic_launcher_monochrome.png"+ rm "$mipmap_dir/_tmp_mono.png"+# Legacy square launcher (logo on solid background)sq_logo=$(( launcher_size * 2 / 3 ))inkscape -w $sq_logo -h $sq_logo "$source_icon_dir/icon-color.svg" -o "$mipmap_dir/_tmp.png"