diff --git a/CHANGELOG.md b/CHANGELOG.md index 71284f6..a1fa105 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ What changed in each release of LLeMbas for Android. Versions follow SemVer; until 1.0.0 the app is in alpha and releases come off `main`. +## Unreleased + +### Changed + +- **The launcher icon is the app's own**: the LLeMbas leaf with a small phone beside it, so the app + is told apart from the other LLeMbas products. The notification icon stays the leaf. + ## [1.0.0-beta.14] — 2026-11-24 What is said here of replies that start by themselves needs an instance newer than LLeMbas diff --git a/app/src/main/res/drawable/ic_launcher_foreground.xml b/app/src/main/res/drawable/ic_launcher_foreground.xml index af70249..69ee5a5 100644 --- a/app/src/main/res/drawable/ic_launcher_foreground.xml +++ b/app/src/main/res/drawable/ic_launcher_foreground.xml @@ -3,11 +3,12 @@ - - - - - - + + + + + + + diff --git a/app/src/main/res/drawable/ic_launcher_monochrome.xml b/app/src/main/res/drawable/ic_launcher_monochrome.xml index 9aa00c6..a9cfded 100644 --- a/app/src/main/res/drawable/ic_launcher_monochrome.xml +++ b/app/src/main/res/drawable/ic_launcher_monochrome.xml @@ -3,7 +3,7 @@ - - + + diff --git a/scripts/gen-icons.py b/scripts/gen-icons.py index 5d2e840..1c38e16 100755 --- a/scripts/gen-icons.py +++ b/scripts/gen-icons.py @@ -6,9 +6,13 @@ The mark is a 16x16 grid of rects, so it converts exactly into Android vector drawables -- one path per colour -- and needs no PNG at any density: - drawable/ic_launcher_foreground.xml the leaf, in the adaptive icon's 66dp safe zone - drawable/ic_launcher_monochrome.xml its silhouette, for themed icons - drawable/ic_notification.xml the same silhouette: a status-bar icon is alpha only + drawable/ic_launcher_foreground.xml the leaf and the app's own sign, in the adaptive icon's 66dp safe zone + drawable/ic_launcher_monochrome.xml their silhouette, for themed icons + drawable/ic_notification.xml the leaf's silhouette alone: a status-bar icon is alpha only + +Each LLeMbas product carries the server's leaf with one small pixel sign of its own in the free +corner; this app's is a phone. The launcher's art is 24 pixels across: the leaf at (2, 2), the sign +at (13, 14). """ from __future__ import annotations @@ -37,6 +41,37 @@ def rects(svg: str) -> list[tuple[int, int, int, int, str]]: return found +# The app's sign: a phone, in the launcher only. +SIGN_COLOUR = "#C792EA" +SIGN = ( + "..#####..", + "..#...#..", + "..#...#..", + "..#...#..", + "..#...#..", + "..#.#.#..", + "..#####..", +) +LEAF_AT = (2, 2) +SIGN_AT = (13, 14) + + +def sign() -> list[tuple[int, int, int, int, str]]: + cells = [] + for y, row in enumerate(SIGN): + x = 0 + while x < len(row): + if row[x] != "#": + x += 1 + continue + w = 1 + while x + w < len(row) and row[x + w] == "#": + w += 1 + cells.append((x + SIGN_AT[0], y + SIGN_AT[1], w, 1, SIGN_COLOUR)) + x += w + return cells + + def path(cells) -> str: return " ".join(f"M{x},{y}h{w}v{h}h-{w}z" for x, y, w, h, _ in cells) @@ -61,14 +96,19 @@ def main() -> None: for cell in cells: by_colour[cell[4]].append(cell) - # 108dp adaptive canvas; the leaf scaled x3.5 (56dp) and centred, inside the 66dp safe zone. + # 108dp adaptive canvas; the art is 24 pixels across, scaled x2.75 (66dp) and centred: the safe zone. + launcher = [(x + LEAF_AT[0], y + LEAF_AT[1], w, h, c) for x, y, w, h, c in cells] + sign() + launcher_by_colour: dict[str, list] = defaultdict(list) + for cell in launcher: + launcher_by_colour[cell[4]].append(cell) coloured = "".join( f' \n' - for colour, group in sorted(by_colour.items()) + for colour, group in sorted(launcher_by_colour.items()) ) - group = f' \n{coloured} \n' + placed = ' \n' + group = f"{placed}{coloured} \n" + mono = f'{placed} \n \n' silhouette = f' \n' - mono = f' \n{silhouette} \n' RES.mkdir(parents=True, exist_ok=True) (RES / "ic_launcher_foreground.xml").write_text(vector(108, 108, group))