From c6660c21cd4da352b710631363d494c56feffc8e Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Sat, 3 Oct 2026 10:31:48 +0200 Subject: feat(android): the MeshBay icon The desktop client's icon in the adaptive icon's safe zone, over its own edge colour, so no launcher mask crops the M. Co-Authored-By: Claude Opus 5.5 --- packages/meshbay-android/README.md | 25 +++++++++++++++++++++ .../app/src/main/AndroidManifest.xml | 2 ++ .../src/main/res/mipmap-anydpi-v26/ic_launcher.xml | 7 ++++++ .../res/mipmap-anydpi-v26/ic_launcher_round.xml | 7 ++++++ .../res/mipmap-hdpi/ic_launcher_foreground.png | Bin 0 -> 17157 bytes .../res/mipmap-mdpi/ic_launcher_foreground.png | Bin 0 -> 8754 bytes .../res/mipmap-xhdpi/ic_launcher_foreground.png | Bin 0 -> 28251 bytes .../res/mipmap-xxhdpi/ic_launcher_foreground.png | Bin 0 -> 55758 bytes .../res/mipmap-xxxhdpi/ic_launcher_foreground.png | Bin 0 -> 87228 bytes .../app/src/main/res/values/colors.xml | 5 +++++ 10 files changed, 46 insertions(+) create mode 100644 packages/meshbay-android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml create mode 100644 packages/meshbay-android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml create mode 100644 packages/meshbay-android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png create mode 100644 packages/meshbay-android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png create mode 100644 packages/meshbay-android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png create mode 100644 packages/meshbay-android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png create mode 100644 packages/meshbay-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png create mode 100644 packages/meshbay-android/app/src/main/res/values/colors.xml diff --git a/packages/meshbay-android/README.md b/packages/meshbay-android/README.md index 68f6dad..85e2406 100644 --- a/packages/meshbay-android/README.md +++ b/packages/meshbay-android/README.md @@ -37,3 +37,28 @@ source: `packages/meshbay-hub/tests/test_android_shell.py`. Not built yet: phone-specific behaviour (back button, network handover, keeping a download alive with the screen off), signed releases. + +## Icon + +The desktop client's icon, `meshbay-client/build/icon-square.png`, placed in +the adaptive icon's safe zone (72 dp of the 108 dp layer, which is what every +launcher mask leaves visible) over its own edge colour, so no mask crops the +M. The five `mipmap-*/ic_launcher_foreground.png` are generated from it: + +```python +from PIL import Image, ImageDraw, ImageFilter +src = Image.open("../meshbay-client/build/icon-square.png").convert("RGBA") +for name, L in [("mdpi", 108), ("hdpi", 162), ("xhdpi", 216), ("xxhdpi", 324), ("xxxhdpi", 432)]: + S = L * 72 // 108; b = max(2, S // 25) + img = src.resize((S, S), Image.LANCZOS) + mask = Image.new("L", (S, S), 0) + ImageDraw.Draw(mask).rectangle([b, b, S - b - 1, S - b - 1], fill=255) + img.putalpha(mask.filter(ImageFilter.GaussianBlur(b))) + layer = Image.new("RGBA", (L, L), (0, 0, 0, 0)) + layer.paste(img, ((L - S) // 2, (L - S) // 2), img) + layer.save(f"app/src/main/res/mipmap-{name}/ic_launcher_foreground.png", optimize=True) +``` + +No monochrome layer: a themed icon keeps only the layer's alpha, and this one +would be a filled square. + diff --git a/packages/meshbay-android/app/src/main/AndroidManifest.xml b/packages/meshbay-android/app/src/main/AndroidManifest.xml index d6f83ee..2eae3ea 100644 --- a/packages/meshbay-android/app/src/main/AndroidManifest.xml +++ b/packages/meshbay-android/app/src/main/AndroidManifest.xml @@ -14,6 +14,8 @@ fails to open on the next device. --> + + + + + diff --git a/packages/meshbay-android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/packages/meshbay-android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 0000000..50c1c99 --- /dev/null +++ b/packages/meshbay-android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,7 @@ + + + + + + diff --git a/packages/meshbay-android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/packages/meshbay-android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..5b29801 Binary files /dev/null and b/packages/meshbay-android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png differ diff --git a/packages/meshbay-android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/packages/meshbay-android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..4e211fb Binary files /dev/null and b/packages/meshbay-android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png differ diff --git a/packages/meshbay-android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/packages/meshbay-android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..d86c80b Binary files /dev/null and b/packages/meshbay-android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png differ diff --git a/packages/meshbay-android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/packages/meshbay-android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..2fdac24 Binary files /dev/null and b/packages/meshbay-android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png differ diff --git a/packages/meshbay-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/packages/meshbay-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..6cc1a12 Binary files /dev/null and b/packages/meshbay-android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png differ diff --git a/packages/meshbay-android/app/src/main/res/values/colors.xml b/packages/meshbay-android/app/src/main/res/values/colors.xml new file mode 100644 index 0000000..515e694 --- /dev/null +++ b/packages/meshbay-android/app/src/main/res/values/colors.xml @@ -0,0 +1,5 @@ + + + + #010822 + -- cgit v1.2.3