diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 04ba8d0..310f328 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,8 +1,8 @@ diff --git a/art/icon-512.png b/art/icon-512.png new file mode 100644 index 0000000..86463e1 Binary files /dev/null and b/art/icon-512.png differ diff --git a/art/icon-master.png b/art/icon-master.png new file mode 100644 index 0000000..8a8f100 Binary files /dev/null and b/art/icon-master.png differ diff --git a/res/drawable-hdpi/ic_launcher.png b/res/drawable-hdpi/ic_launcher.png index ee82b45..2f78b59 100644 Binary files a/res/drawable-hdpi/ic_launcher.png and b/res/drawable-hdpi/ic_launcher.png differ diff --git a/res/drawable-hdpi/ic_stat.png b/res/drawable-hdpi/ic_stat.png index 9789320..b121ea1 100644 Binary files a/res/drawable-hdpi/ic_stat.png and b/res/drawable-hdpi/ic_stat.png differ diff --git a/res/drawable-ldpi/ic_launcher.png b/res/drawable-ldpi/ic_launcher.png index de70af6..d4fb1f9 100644 Binary files a/res/drawable-ldpi/ic_launcher.png and b/res/drawable-ldpi/ic_launcher.png differ diff --git a/res/drawable-ldpi/ic_stat.png b/res/drawable-ldpi/ic_stat.png index d398f32..75483cd 100644 Binary files a/res/drawable-ldpi/ic_stat.png and b/res/drawable-ldpi/ic_stat.png differ diff --git a/res/drawable-mdpi/ic_launcher.png b/res/drawable-mdpi/ic_launcher.png index edf9e1e..e163909 100644 Binary files a/res/drawable-mdpi/ic_launcher.png and b/res/drawable-mdpi/ic_launcher.png differ diff --git a/res/drawable-mdpi/ic_stat.png b/res/drawable-mdpi/ic_stat.png index 4c00771..9cb98a9 100644 Binary files a/res/drawable-mdpi/ic_stat.png and b/res/drawable-mdpi/ic_stat.png differ diff --git a/res/drawable-xhdpi/ic_launcher.png b/res/drawable-xhdpi/ic_launcher.png new file mode 100644 index 0000000..f64a108 Binary files /dev/null and b/res/drawable-xhdpi/ic_launcher.png differ diff --git a/res/drawable-xhdpi/ic_stat.png b/res/drawable-xhdpi/ic_stat.png new file mode 100644 index 0000000..7e6497b Binary files /dev/null and b/res/drawable-xhdpi/ic_stat.png differ diff --git a/tools/make_icons.py b/tools/make_icons.py index b1fcfe1..435303e 100644 --- a/tools/make_icons.py +++ b/tools/make_icons.py @@ -1,53 +1,37 @@ -"""Draws the launcher and status-bar icons at ldpi/mdpi/hdpi (supersampled for smooth edges).""" +"""Draws the notification (status bar) icon at ldpi/mdpi/hdpi/xhdpi, matching the launcher icon: +an amber play triangle between orange arcs, on transparent (supersampled). + +The launcher icon itself is a supplied asset (res/drawable-*/ic_launcher.png, masters in art/) +and is not generated here. +""" import os import sys from PIL import Image, ImageDraw RES = sys.argv[1] -BG = (24, 24, 29, 255) -ACCENT = (247, 176, 46, 255) -DARK = (22, 19, 12, 255) - - -def launcher(size): - S = size * 8 - im = Image.new("RGBA", (S, S), (0, 0, 0, 0)) - d = ImageDraw.Draw(im) - pad = S * 0.06 - d.rounded_rectangle([pad, pad, S - pad, S - pad], radius=S * 0.22, fill=BG) - # amber disc with a ring groove and a play notch: a record that is also a play button - c = S * 0.46 - r = S * 0.29 - d.ellipse([c - r, c - r, c + r, c + r], fill=ACCENT) - rr = r * 0.72 - w = max(2, int(S * 0.018)) - d.ellipse([c - rr, c - rr, c + rr, c + rr], outline=DARK, width=w) - t = r * 0.42 - d.polygon([(c - t * 0.55, c - t), (c + t * 0.95, c), (c - t * 0.55, c + t)], fill=DARK) - # three level bars, lower right - bw = S * 0.045 - for i, h in enumerate((0.10, 0.17, 0.13)): - x = S * 0.72 + i * bw * 1.6 - d.rounded_rectangle([x, S * 0.82 - S * h, x + bw, S * 0.82], radius=bw / 2, fill=ACCENT) - return im.resize((size, size), Image.LANCZOS) +AMBER = (255, 196, 0, 255) +YELLOW = (255, 199, 20, 255) +ORANGE = (255, 128, 0, 255) def status(size): + # one pair of arcs: at 19-25 px two pairs crowd the triangle S = size * 8 im = Image.new("RGBA", (S, S), (0, 0, 0, 0)) d = ImageDraw.Draw(im) c = S / 2 - r = S * 0.44 - d.ellipse([c - r, c - r, c + r, c + r], fill=ACCENT) - t = r * 0.45 - d.polygon([(c - t * 0.55, c - t), (c + t * 0.95, c), (c - t * 0.55, c + t)], fill=(0, 0, 0, 0)) + w = max(2, int(S * 0.11)) + r = S * 0.43 + box = [c - r, c - r, c + r, c + r] + d.arc(box, 135, 225, fill=ORANGE, width=w) + d.arc(box, -45, 45, fill=ORANGE, width=w) + t = S * 0.24 + d.polygon([(c - t * 0.72, c - t), (c + t * 1.0, c), (c - t * 0.72, c + t)], fill=AMBER) return im.resize((size, size), Image.LANCZOS) -for folder, ls, ss in (("drawable-ldpi", 36, 19), ("drawable-mdpi", 48, 25), ("drawable-hdpi", 72, 38)): +for folder, ss in (("drawable-ldpi", 19), ("drawable-mdpi", 25), ("drawable-hdpi", 38), ("drawable-xhdpi", 50)): os.makedirs(os.path.join(RES, folder), exist_ok=True) - launcher(ls).save(os.path.join(RES, folder, "ic_launcher.png")) status(ss).save(os.path.join(RES, folder, "ic_stat.png")) -launcher(192).save(os.path.join(os.path.dirname(RES.rstrip("/")), "icon-preview.png")) -print("icons written") +print("status icons written")