BoxPistols / BoxPistols/claude-touchbar
642 ウィジェットの幅指定 (BTTTBWidgetWidth) が描画に効いていない疑い
- Dominant language
- Python
- Stars
- 0
- Forks
- 0
- Avg merge
- 1m
- Merged PRs (30d)
- 1
Description
## 疑い
`web-sync.py` の `trigger_json` は642(シェルスクリプトウィジェット)の幅を
`BTTTriggerConfig.BTTTBWidgetWidth` で指定している。domdom-inspector側から
「**このキーはBTTのドキュメントに存在せず、保存も読み出しもできるのに描画には効かない**。
描画に効くのは629も642も `BTTTouchBarButtonUseFixedWidth: 1` + `BTTTouchBarButtonWidth`
(既定はAuto = 文字数で伸縮)」という指摘を受けた。
事実なら、`入力` / `テーマ` を70で揃えたつもりの幅は効いておらず、実際は文字数で伸縮している。
利用者に「70pt × 2 = 148pt」と説明済みなので、説明も誤っていることになる。
## 未検証
**こちらでは裏を取れていない**。理由は2つ。
- 指摘はdomdom-inspector側の実測であり、こちらで再現していない
- 現在 `入力` / `テーマ` は https://github.com/BoxPistols/claude-touchbar/issues/1 の
影響で常にhiddenなので、描画そのものを観察できない
BTT上ではdomdomの3ボタンが両方のキーを持っている(`BTTTouchBarButtonWidth: 90` +
`BTTTouchBarButtonUseFixedWidth: 1` + `BTTTBWidgetWidth: 90`)。両方入っているため、
どちらが効いているかはこの状態からは分からない。
## 確認方法
`入力` に極端な幅(例: 200)を `BTTTBWidgetWidth` だけで与えて描画を見る。伸びなければ
このキーは効いていない。次に `BTTTouchBarButtonUseFixedWidth: 1` + `BTTTouchBarButtonWidth: 200`
を与えて伸びるかを見る。Touch Barの実描画は撮影できないので、目視の確認が要る。
## 対応
効かないことが確認できたら `trigger_json` を両キー併記にし、`width_of` の値をそのまま
`BTTTouchBarButtonWidth` にも入れる。あわせて `docs/DESIGN.md` の642の記述を訂正する
(現在「642は `BTTTBWidgetWidth`。629の `BTTTouchBarButtonWidth` とは別キー」と書いてある)。
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.