Skip to content

Build your personal knowledge base with Trilium Notes

chore(mobile): basic icon set

Elian Dorane956d951a875
diff --git a/apps/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/apps/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
index c023e50595..5ea29ba447 100644
Binary files a/apps/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/apps/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/apps/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/apps/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
index 2127973b2d..97294bd327 100644
Binary files a/apps/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png and b/apps/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png differ
diff --git a/apps/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/apps/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
index b441f37d6a..9d50193cf7 100644
Binary files a/apps/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png and b/apps/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ
diff --git a/apps/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/apps/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
index 72905b854c..68ba091a12 100644
Binary files a/apps/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/apps/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/apps/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/apps/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
index 8ed0605c27..ed2be467a4 100644
Binary files a/apps/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png and b/apps/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png differ
diff --git a/apps/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/apps/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
index 9502e47a2c..9e0894995d 100644
Binary files a/apps/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png and b/apps/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ
diff --git a/apps/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/apps/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
index 4d1e077104..b52906d5b1 100644
Binary files a/apps/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/apps/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/apps/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/apps/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
index df0f15880b..ec3ff83064 100644
Binary files a/apps/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png and b/apps/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png differ
diff --git a/apps/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/apps/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
index 853db043d8..1f246b0397 100644
Binary files a/apps/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png and b/apps/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ
diff --git a/apps/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/apps/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
index 6cdf97c119..cf16515ee7 100644
Binary files a/apps/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/apps/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/apps/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/apps/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
index 2960cbb610..0b713fa78b 100644
Binary files a/apps/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png and b/apps/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png differ
diff --git a/apps/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/apps/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
index 8e3093a86f..8dac161eca 100644
Binary files a/apps/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and b/apps/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ
diff --git a/apps/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/apps/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
index 46de6e255a..882b882f02 100644
Binary files a/apps/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/apps/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/apps/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/apps/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
index d2ea9abed3..04ee77ad49 100644
Binary files a/apps/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png and b/apps/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png differ
diff --git a/apps/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/apps/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
index a40d73e9c6..82ef8085db 100644
Binary files a/apps/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and b/apps/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ
diff --git a/scripts/icons/create-icons.sh b/scripts/icons/create-icons.sh
index da696edc04..fb15b64f19 100644
--- a/scripts/icons/create-icons.sh
+++ b/scripts/icons/create-icons.sh
@@ -76,4 +76,52 @@ magick "./png/256x256-dev.png" -background "#ffffff" -gravity center -extent 640
# Copy server assets
server_dir="$script_dir/../../apps/server"
cp "$desktop_forge_dir/app-icon/icon.ico" "$server_dir/src/assets/icon.ico"
-cp "$desktop_forge_dir/app-icon/icon-dev.ico" "$server_dir/src/assets/icon-dev.ico"
\ No newline at end of file
+cp "$desktop_forge_dir/app-icon/icon-dev.ico" "$server_dir/src/assets/icon-dev.ico"
+
+# Build Android mobile icons
+# Legacy launcher: 48/72/96/144/192 px. Adaptive foreground: 108dp canvas with
+# ~66% safe zone (Android masks the outer ring), scaled per density.
+mobile_res_dir="$script_dir/../../apps/mobile/android/app/src/main/res"
+background_color="#FFFFFF"
+
+# Circular mask rendered via Inkscape for crisp antialiasing at icon sizes.
+circle_mask_svg=$(mktemp --suffix=.svg)
+cat > "$circle_mask_svg" <<'EOF'
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
+ <circle cx="50" cy="50" r="50" fill="white"/>
+</svg>
+EOF
+trap 'rm -f "$circle_mask_svg"' EXIT
+
+declare -A launcher_sizes=( [mdpi]=48 [hdpi]=72 [xhdpi]=96 [xxhdpi]=144 [xxxhdpi]=192 )
+declare -A foreground_sizes=( [mdpi]=108 [hdpi]=162 [xhdpi]=216 [xxhdpi]=324 [xxxhdpi]=432 )
+
+for density in mdpi hdpi xhdpi xxhdpi xxxhdpi; do
+ launcher_size=${launcher_sizes[$density]}
+ foreground_size=${foreground_sizes[$density]}
+ mipmap_dir="$mobile_res_dir/mipmap-$density"
+ mkdir -p "$mipmap_dir"
+
+ # Adaptive foreground (transparent, logo in safe zone)
+ fg_logo=$(( foreground_size * 2 / 3 ))
+ inkscape -w $fg_logo -h $fg_logo "$source_icon_dir/icon-color.svg" -o "$mipmap_dir/_tmp_fg.png"
+ magick "$mipmap_dir/_tmp_fg.png" -background none -gravity center \
+ -extent ${foreground_size}x${foreground_size} "$mipmap_dir/ic_launcher_foreground.png"
+ rm "$mipmap_dir/_tmp_fg.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"
+ magick "$mipmap_dir/_tmp.png" -background "$background_color" -gravity center \
+ -extent ${launcher_size}x${launcher_size} "$mipmap_dir/ic_launcher.png"
+
+ # Legacy round launcher: Inkscape-rendered circle used as alpha mask.
+ # Extract the mask's alpha channel (circle=opaque, bg=transparent) and copy
+ # it onto the square icon.
+ inkscape -w $launcher_size -h $launcher_size "$circle_mask_svg" \
+ -o "$mipmap_dir/_tmp_mask.png"
+ magick "$mipmap_dir/ic_launcher.png" \
+ \( "$mipmap_dir/_tmp_mask.png" -alpha extract \) \
+ -compose CopyOpacity -composite "$mipmap_dir/ic_launcher_round.png"
+ rm "$mipmap_dir/_tmp.png" "$mipmap_dir/_tmp_mask.png"
+done
\ No newline at end of file