Minamp 1.7: new launcher icon
- Launcher icon is now a supplied asset (masters in art/), with an xhdpi size added; make_icons.py only draws the notification icon, redrawn to match: an amber play triangle between orange arcs Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
No files matched your search
@@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.minamp"
|
package="com.minamp"
|
||||||
android:versionCode="7"
|
android:versionCode="8"
|
||||||
android:versionName="1.6"
|
android:versionName="1.7"
|
||||||
android:installLocation="auto">
|
android:installLocation="auto">
|
||||||
|
|
||||||
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="10" />
|
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="10" />
|
||||||
|
|||||||
|
After Width: | Height: | Size: 228 KiB |
|
After Width: | Height: | Size: 1015 KiB |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 732 B After Width: | Height: | Size: 613 B |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 886 B |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
@@ -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 os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from PIL import Image, ImageDraw
|
from PIL import Image, ImageDraw
|
||||||
|
|
||||||
RES = sys.argv[1]
|
RES = sys.argv[1]
|
||||||
BG = (24, 24, 29, 255)
|
AMBER = (255, 196, 0, 255)
|
||||||
ACCENT = (247, 176, 46, 255)
|
YELLOW = (255, 199, 20, 255)
|
||||||
DARK = (22, 19, 12, 255)
|
ORANGE = (255, 128, 0, 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)
|
|
||||||
|
|
||||||
|
|
||||||
def status(size):
|
def status(size):
|
||||||
|
# one pair of arcs: at 19-25 px two pairs crowd the triangle
|
||||||
S = size * 8
|
S = size * 8
|
||||||
im = Image.new("RGBA", (S, S), (0, 0, 0, 0))
|
im = Image.new("RGBA", (S, S), (0, 0, 0, 0))
|
||||||
d = ImageDraw.Draw(im)
|
d = ImageDraw.Draw(im)
|
||||||
c = S / 2
|
c = S / 2
|
||||||
r = S * 0.44
|
w = max(2, int(S * 0.11))
|
||||||
d.ellipse([c - r, c - r, c + r, c + r], fill=ACCENT)
|
r = S * 0.43
|
||||||
t = r * 0.45
|
box = [c - r, c - r, c + r, c + r]
|
||||||
d.polygon([(c - t * 0.55, c - t), (c + t * 0.95, c), (c - t * 0.55, c + t)], fill=(0, 0, 0, 0))
|
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)
|
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)
|
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"))
|
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("status icons written")
|
||||||
print("icons written")
|
|
||||||