Merge pull request #541 from H-Chris233/fix/windows-capsule-hitbox

fix(ui): restore Windows capsule hitbox metrics
This commit is contained in:
Chris233 authored and GitHub committed 2026-05-28 11:38:40 +08:00
commit 5acb2dff1a
1 file changed
+2 -3
+2 -3
View File
@@ -25,9 +25,8 @@ export interface CapsuleMessageLayout {
export function getCapsulePillMetrics(os: OS): CapsulePillMetrics {
if (os === 'win') {
// Windows metrics describe the visible outer footprint of the pill.
// 与 macOS pill 接近以保持视觉密度一致;保留 ~4-5% 余量适配 Windows 字体 metrics。
return { width: 180, height: 44, textWidth: 88, boxSizing: 'border-box' };
// Windows metrics 必须与 src-tauri/src/lib.rs 的原生命中框合同保持一致。
return { width: 196, height: 52, textWidth: 104, boxSizing: 'border-box' };
}
return { width: 176, height: 42, textWidth: 84, boxSizing: 'border-box' };