diff --git a/CHANGELOG.md b/CHANGELOG.md index 245b16e..d52ff77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed +- **A new app icon.** An off-white arch bridge on black, with three + turquoise dots above it. It replaces the bar chart over an arc. + `assets/icon.svg` is the source, and `scripts/generate-icon.py` writes the + PNG, ICNS and ICO from it. ### Added - **Simplified Chinese.** Every page, dialog, the menu bar panel, its tray menu and the system notifications are translated into 简体中文, and diff --git a/assets/icon.icns b/assets/icon.icns index ad77410..f46e826 100644 Binary files a/assets/icon.icns and b/assets/icon.icns differ diff --git a/assets/icon.ico b/assets/icon.ico index 144bd8f..4853734 100644 Binary files a/assets/icon.ico and b/assets/icon.ico differ diff --git a/assets/icon.png b/assets/icon.png index beb21b7..4427f5a 100644 Binary files a/assets/icon.png and b/assets/icon.png differ diff --git a/assets/icon.svg b/assets/icon.svg new file mode 100644 index 0000000..9a1113f --- /dev/null +++ b/assets/icon.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/docs/icon.png b/docs/icon.png index 4d74d9c..d8cbd60 100644 Binary files a/docs/icon.png and b/docs/icon.png differ diff --git a/scripts/generate-icon.py b/scripts/generate-icon.py new file mode 100644 index 0000000..6d68bde --- /dev/null +++ b/scripts/generate-icon.py @@ -0,0 +1,98 @@ +#!/usr/bin/env python3 +"""Write every icon format the build uses from assets/icon.svg. + +The SVG is the source: a rounded tile, one path for the bridge and a circle +for each of the dots above it, the bills it carries. This script draws those +itself, so it needs only Pillow and reads nothing else from the file. + + python3 scripts/generate-icon.py # run from the repo root + +Writes assets/icon.png (1024, on the macOS icon grid with its 100px margin), +assets/icon.icns, assets/icon.ico (the tile filling the square, 16-256) and +docs/icon.png (256, the site's favicon). +""" +import re + +from PIL import Image, ImageChops, ImageDraw + +SUPERSAMPLE = 4 +CURVE_STEPS = 48 + + +def read_source(path="assets/icon.svg"): + text = open(path, encoding="utf-8").read() + rect = re.search(r'