From d758d5f71db13575c0d87a08b932acc356619d30 Mon Sep 17 00:00:00 2001 From: H-Chris233 Date: Thu, 28 May 2026 11:27:33 +0800 Subject: [PATCH] fix(ui): restore Windows capsule hitbox metrics --- openless-all/app/src/lib/capsuleLayout.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/openless-all/app/src/lib/capsuleLayout.ts b/openless-all/app/src/lib/capsuleLayout.ts index cf116eb6..50fd67da 100644 --- a/openless-all/app/src/lib/capsuleLayout.ts +++ b/openless-all/app/src/lib/capsuleLayout.ts @@ -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' };