From 69a4a86a049109402f36a81ebdf63279c791553d Mon Sep 17 00:00:00 2001 From: laoyang Date: Wed, 16 Sep 2026 22:05:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E4=BA=86=E5=91=A8=E8=A7=86?= =?UTF-8?q?=E5=9B=BE=E9=A2=9C=E8=89=B2=E7=9A=84=E5=AF=B9=E6=AF=94=E5=BA=A6?= =?UTF-8?q?=EF=BC=8C=E7=8E=B0=E5=9C=A8=E7=9C=8B=E8=B5=B7=E6=9D=A5=E6=9B=B4?= =?UTF-8?q?=E8=88=92=E6=9C=8D=E4=BA=86=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: laoyang --- entry/src/main/ets/pages/Index.ets | 9 +++++++-- entry/src/main/resources/base/element/color.json | 1 + entry/src/main/resources/dark/element/color.json | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/entry/src/main/ets/pages/Index.ets b/entry/src/main/ets/pages/Index.ets index b891c1a..4b85882 100644 --- a/entry/src/main/ets/pages/Index.ets +++ b/entry/src/main/ets/pages/Index.ets @@ -1519,8 +1519,12 @@ struct Index { Column({ space: 2 }) { Text(WEEK_LABELS[(new Date(cell.dateMs).getDay() + 6) % 7]) .fontSize(11) + // ⚠️ 这里原来用 button_text(纯白),但该标签**没有背景**、坐在页面底色上, + // 浅色模式下是"白字压浅灰底"→ 对比度仅 1.11:1(应用市场 UX 检测被判不合格)。 + // 改用 brand_text(品牌色文字版):浅 #0057C2 → 6.01:1,深 #4DA3FF → 8.0:1, + // 既保留"选中"的强调含义,又满足对比度要求。 .fontColor(cell.dateMs === this.selectedDate - ? $r('app.color.button_text') : $r('app.color.text_hint')) + ? $r('app.color.brand_text') : $r('app.color.text_hint')) Text(String(cell.day)) .fontSize(14) .fontWeight(cell.dateMs === this.selectedDate || cell.isToday @@ -1971,8 +1975,9 @@ struct Index { Row({ space: 10 }) { Text(WEEK_LABELS[(new Date(cell.dateMs).getDay() + 6) % 7]) .fontSize(12) + // 同上:选中态改用高对比的 brand_text(原 text_secondary 在浅色下仅 2.85:1) .fontColor(cell.dateMs === this.selectedDate - ? $r('app.color.text_secondary') : $r('app.color.text_hint')) + ? $r('app.color.brand_text') : $r('app.color.text_hint')) .width(18) .textAlign(TextAlign.Center) Text(String(cell.day)) diff --git a/entry/src/main/resources/base/element/color.json b/entry/src/main/resources/base/element/color.json index 815377e..86defbe 100644 --- a/entry/src/main/resources/base/element/color.json +++ b/entry/src/main/resources/base/element/color.json @@ -8,6 +8,7 @@ { "name": "text_secondary", "value": "#66000000" }, { "name": "text_hint", "value": "#4D000000" }, { "name": "brand", "value": "#007DFF" }, + { "name": "brand_text", "value": "#0057C2" }, { "name": "brand_disabled", "value": "#99007DFF" }, { "name": "button_text", "value": "#FFFFFF" }, { "name": "success", "value": "#00B34A" }, diff --git a/entry/src/main/resources/dark/element/color.json b/entry/src/main/resources/dark/element/color.json index 407dde8..a2a7465 100644 --- a/entry/src/main/resources/dark/element/color.json +++ b/entry/src/main/resources/dark/element/color.json @@ -8,6 +8,7 @@ { "name": "text_secondary", "value": "#99FFFFFF" }, { "name": "text_hint", "value": "#66FFFFFF" }, { "name": "brand", "value": "#0A84FF" }, + { "name": "brand_text", "value": "#4DA3FF" }, { "name": "brand_disabled", "value": "#660A84FF" }, { "name": "button_text", "value": "#FFFFFF" }, { "name": "success", "value": "#34C759" },