diff --git a/client/harmony/entry/src/main/ets/pages/MainPage.ets b/client/harmony/entry/src/main/ets/pages/MainPage.ets index f28da46..ff8c9f6 100644 --- a/client/harmony/entry/src/main/ets/pages/MainPage.ets +++ b/client/harmony/entry/src/main/ets/pages/MainPage.ets @@ -688,10 +688,28 @@ struct InboxTab { Row() { Text(mail.from_name).fontSize(14).fontWeight(mail.status === 'unread' ? FontWeight.Bold : FontWeight.Normal).fontColor(Theme.textPrimary) if (this.accountFilter === 'all' && mail.source_account_name.length > 0) { + /* + * 账号徽标(聚合模式下才显示)—— **逐项对齐 WebUI**(`MailList.tsx:303-310`): + * + * className="text-[10px] leading-4 px-1.5 rounded-full + * bg-gray-100 text-gray-600 shrink-0 max-w-[80px] truncate" + * + * 即:**中性灰底 + 灰字 + 全圆胶囊 + 最多 80px 截断**。 + * + * ★ 原来写的是 `accentSoftFor`(品牌浅蓝底)+ `accentFor`(品牌蓝字) + * + `borderRadius(4)`(圆角方)。三处都不一样: + * · 底色:品牌浅蓝 vs 中性灰 —— 徽标被染成了"我们家的"颜色, + * 而它表达的是"这条来自哪个账号",是**中性的元信息**, + * 不该与主操作抢注意力(WebUI 选 gray-100 就是这个意思); + * · 形状:圆角方 vs 全圆胶囊; + * · 截断:原来没有 maxWidth —— 账号名一长就把主题挤没了。 + */ Text(mail.source_account_name) - .fontSize(10).fontColor(Theme.accentFor()) - .backgroundColor(Theme.accentSoftFor(this.isDarkNow)).borderRadius(4) - .padding({ left: 5, right: 5, top: 1, bottom: 1 }) + .fontSize(10).fontColor(Theme.textMuted) + .backgroundColor(Theme.surfaceMuted).borderRadius(8) + .padding({ left: 6, right: 6, top: 1, bottom: 1 }) + .constraintSize({ maxWidth: 80 }) + .maxLines(1).textOverflow({ overflow: TextOverflow.Ellipsis }) .margin({ left: 6 }) } Blank()