diff options
Diffstat (limited to 'packages/meshbay-android/README.md')
| -rw-r--r-- | packages/meshbay-android/README.md | 25 |
1 files changed, 25 insertions, 0 deletions
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. + |