品牌 icon 落地:托盤/app/msix/landing favicon 用 leo 的 CIS

用戶從 rag.arcrun.dev → install.arcrun.dev → 自己的 portal → 托盤,
四個地方應該看到同一個 icon。此前最不一致的就是托盤(Fyne 內建的通用
「儲存」圖示,main.go:1016 留著 TODO)。

素材真身=InkStoneCo/arcrun-cis/(leo 用 Claude Design 做的 CIS)。

托盤(trayicon.go,新檔)
- macOS:template 單色(純黑+alpha),系統依選單列深淺自動反色。
  ⚠️ fyne v2.5.3 只有 *theme.ThemedResource 才會走 systray.SetTemplateIcon
  (driver_desktop.go:169);傳一般 StaticResource 會走 SetIcon=不反色。
- Windows:完整墨底 icon(template 是 mac 專有)。
- 兩份都用 go:embed 內嵌,不讀外部路徑——打包後工作目錄不是原始碼目錄。
- 選單列用雙 chevron 而非完整方形字符:CIS 規定 26px 以下降級成 chevron,
  方塊裡的字符只佔高度 ~28%,22pt 下只剩 ~4px 會糊掉。

app 圖示
- icon.png 換成 CIS 1024 原生;icns 重產含 16→1024 全套 Retina 階梯。

msix(Store)
- 圖示改成預先產好、隨 repo 版控的 assets/store/(含 gen-store-assets.py 可重跑)。
- 修掉一個實際的變形 bug:舊版 `sips -z 150 310 icon.png` 會把方形 icon
  **橫向拉扁**成寬磚(實測產出的字符明顯變形),違反 CIS「never skew or stretch」。
  寬磚改用橫式 lockup 等比置中於墨底。
- 補 71x71/310x310/targetsize-16/24/32/48/256,manifest 一併宣告;
  BackgroundColor 從 transparent 改成品牌 Ink #17181A。

landing favicon(rag.arcrun.dev)
- LOGO_SVG 從琥珀金圓圈暫代圖換成 CIS 正式 mark(單色,CIS:彩色 chevron
  在產品裡代表「這條關係是活的」,用在 logo 會是謊話)。
- 修掉名實不符:`/favicon.ico` 過去回的是 SVG 位元組卻標 image/svg+xml
  (線上實測 200 但 type=image/svg+xml),老瀏覽器與抓圖服務畫不出來。
  現在 .ico 回真 ICO(16/32/48 三尺寸)、apple-touch-icon.png 回真 PNG(180)。
- 三個頁面(首頁/privacy/support)補上 icon link 宣告(此前完全沒有)。

⚠️ installer 這次沒動:`install.arcrun.dev` 的真身是
`installer/oauth-prototype/worker.js`(不在本分支,見 wiki decisions-summary
「installer 有兩個 worker,改錯=白做」),另立一筆處理。

實測證據
- mac .app 執行檔內 grep 到 tray-template.png 位元組(sha f6af940d,位移 14001472);
  Windows exe 內 grep 到 tray-windows.png(sha 59f4f1ac);各自平台只嵌自己那份
  (另一份被 linker 消掉=runtime.GOOS 編譯期常數,正確)。
- msix 重打包過 makemsix unpack 回讀驗證,包內 11 張圖示齊全。
- 已部署 arcrun-landing(版本 b79d19df)。繞快取實測 rag.arcrun.dev:
  favicon.ico→image/x-icon 1573B(3 icons,sha 151e645b=與本機產出同一顆)、
  apple-touch-icon.png→image/png 180x180、首頁 head 三個 link 宣告都在。
  ⚠️ 舊版 max-age=86400 的邊緣快取未 purge(無 zone token),24h 內自然過期。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-31 20:39:35 +08:00
parent 0c93475ab9
commit 7ecd740f82
19 changed files with 338 additions and 2 deletions
+38
View File
@@ -0,0 +1,38 @@
# Microsoft Store 圖示素材(msix
這裡的 PNG 是 **產物**,但**隨 repo 版控**——因為 `build-msix.sh` 打包時只做 `cp`
不在打包當下重算(打包機不一定拿得到 CIS 素材)。
## 真身在哪
品牌素材真身=`InkStoneCo/arcrun-cis/`leo 的 CIS2026-07-31)。
**不要在這裡改圖**;要改品牌就改 CIS,然後重跑產生器。
## 重新產生
```bash
python3 gen-store-assets.py # 需要 Pillow
# CIS 不在預設位置時:
ARCRUN_CIS=/path/to/arcrun-cis python3 gen-store-assets.py
```
## 每個檔案是什麼
| 檔案 | 尺寸 | 用途 | 取材 |
|---|---|---|---|
| `Square44x44Logo.png` | 44×44 | 應用程式清單、工作列 | 方形 icon |
| `StoreLogo.png` | 50×50 | Store 頁面小圖 | 方形 icon |
| `Square71x71Logo.png` | 71×71 | 小磚 | 方形 icon |
| `Square150x150Logo.png` | 150×150 | 中磚(預設磚) | 方形 icon |
| `Square310x310Logo.png` | 310×310 | 大磚 | 方形 icon |
| `Wide310x150Logo.png` | 310×150 | 寬磚 | **橫式 lockup** |
| `Square44x44Logo.targetsize-{16,24}.png` | 16/24 | 工作列小圖 | **雙 chevron** |
| `Square44x44Logo.targetsize-{32,48,256}.png` | 32/48/256 | 檔案總管各檢視 | 方形 icon |
## 兩條「為什麼不是直接縮」的理由(別再改回去)
1. **寬磚不能用方形 icon 硬拉**。舊版寫 `sips -z 150 310 icon.png`
`sips -z` 會**照給定的長寬直接拉扁**——實測產出的字符明顯變形,
違反 CIS 的 Don't「never skew or stretch」。寬磚要用橫式 lockup。
2. **16/24px 不能用完整方形 icon**。CIS 明寫「26px 以下降級成 chevron」:
方形 icon 裡的字符只佔畫面高度約 28%,16px 下只剩約 4px 高,糊成一團。