[Bug] macOS 27 输入源切换 HUD 中鼠须管图标为不透明浅色底板

Open
#1,198 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

  • #1199 by @cloudwindy — closed without merging

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
macos, swift
Domain
desktop

Research direction

The HUD icon is set by three keys in Contents/Info.plist (tsInputModeMenuIconFileKey, tsInputModePaletteIconFileKey, tsInputModeAlternateMenuIconFileKey), all pointing to rime.pdf in Resources. Start by checking those keys and the bundle's Assets.car, which already holds a Liquid Glass IconImageStack the HUD does not use. Done means the palette icon renders with a transparent glyph, or light and dark variants, in the macOS 27 input source HUD. The issue does not settle which approach is preferred, so confirm with maintainers before choosing.

Written by the indexing model from the issue text.

Description

简要描述 Bug:

macOS 27 的输入源切换 HUD(Liquid Glass 材质)里,Squirrel 显示为一块不透明的浅色圆角底板 + 深色字形;同一个 HUD 中,系统 ABC 是蓝色圆形 + 白色 A,日文是透明的「あ」。玻璃材质在 Squirrel 这一块完全透不出,深色模式下尤其突兀。

附图见「截图」一节。

预期行为:

输入源图标应为透明底字形(或提供浅色/深色两套外观),让系统 HUD 的玻璃材质可见,并随明暗模式自适应。

实际行为:

显示为不透明浅色底板(像素取样 #E2E2E1),与系统自带输入源的风格不一致。

环境

  • 系统版本:macOS 27.2(26B123)
  • 鼠须管版本:1.1.2(CFBundleVersion 1.1.2,签名时间 2026-01-14)
  • 方案:rime_ice(雾凇拼音)
  • 使用了 Lua:否
  • 与其它 App 有关:否(HUD 由系统绘制,与前台 App 无关)

我试过:

  • 我换了内置的方案(如朙月拼音)后问题仍存在
  • 我找到了导致问题出现的具体设置:这不是设置问题。~/Library/Rime 里的皮肤与候选窗配置对该 HUD 无影响,只与 App bundle 内的图标资源有关
  • 这是个新 Bug,以前真的没有
  • 我对原因有一些猜想:tsInputMode*IconFileKey 指向带不透明底板的 rime.pdf
  • 在 Issues(包括已关闭的 Issue)中未找到相关报告:#776 是 Sonoma 时代的同类问题,#1089 是用户侧替换 rime.pdf 的 workaround

核查到的资源链路(只读,未在本地改动任何文件):

  1. Contents/Info.plist 中三个键指向同一份矢量图:

    <key>tsInputModeMenuIconFileKey</key>          <string>rime.pdf</string>
    <key>tsInputModePaletteIconFileKey</key>       <string>rime.pdf</string>
    <key>tsInputModeAlternateMenuIconFileKey</key> <string>rime.pdf</string>
    
  2. TIS API 实测(Swift + Carbon):

    im.rime.inputmethod.Squirrel.Hans | kTISPropertyIconImageURL = .../Resources/rime.pdf
    im.rime.inputmethod.Squirrel.Hant | kTISPropertyIconImageURL = .../Resources/rime.pdf
    im.rime.inputmethod.Squirrel      | iconImageURL = nil, iconRef = present(来自 Rime.icns)
    
  3. 两张资源都是「带底板」的方图,没有透明字形:

    • rime.pdf 栅格化 = 不透明黑底 + 白色字形;
    • Rime.icns = 白底 + 黑色字形;
    • HUD 里呈现的是浅色底板,与 Rime.icns 的浅色外观一致,说明系统对 palette 图标做了重新着色(具体规则未验证)。
  4. 1.1.2 的 Assets.car 里已经包含 Liquid Glass 版 App 图标(IconImageStack Rime,带 NSAppearanceNameAqua / NSAppearanceNameDarkAqua / ISAppearanceTintable 三套外观),但这个 HUD 不使用它。

复现步骤

  1. macOS 27 + 鼠须管 1.1.2;
  2. 启用鼠须管、ABC / U.S. 布局,以及任一其他输入源;
  3. 按中/英键切换输入源,观察 HUD 中鼠须管图标与系统输入源的差异。

截图

Image

Related

  • #776(Sonoma 时代的同类图标显示问题,仍 open)
  • #1089(用户侧替换 rime.pdf 的 workaround)
Dominant language
Swift
Stars
6.6k
Forks
586
Avg merge
1d 19h
Merged PRs (30d)
1

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rime/squirrel

All issues in rime/squirrel

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.