From fa3dbc6157898bd20b1e9eb16752f07071b060f3 Mon Sep 17 00:00:00 2001 From: laoyang Date: Mon, 2 Nov 2026 17:06:21 +0800 Subject: [PATCH] =?UTF-8?q?style(=E6=9C=88=E8=A7=86=E5=9B=BE):=20=E6=9C=89?= =?UTF-8?q?=E4=BA=8B=E7=9A=84=E6=97=A5=E6=9C=9F=E6=A0=87=E8=AE=B0=E8=89=B2?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E7=BA=A2=E8=89=B2=20#6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 用户要求先看红色效果,蓝色太不显眼。 ## 新增 event_mark 语义色 不直接复用现有的 `error`(#E02020): error 是语义色,到处被"失败/危险"复用。把日程标记挂上去, 以后想调错误提示的红就会连带改掉日历标记,两件事被耦合。 所以单独加一个 event_mark。 色值(农历只有 8px,小字对对比度要求高): · 浅色 #D93025 —— 比 #E02020 更沉,压在白底/浅灰底上更清晰, 也不像"出错"那么刺眼 · 深色 #FF6B60 —— 黑底上要亮一点才够,纯红会显脏 ## 改动范围(3 处) · 月视图(非宽屏)农历文字 · 月视图(宽屏)补位小圆点 · 周视图农历文字 选中日仍用 button_text(白):那天日期数字坐在深红底上, 农历必须白色,否则红字压深底看不清。 --- entry/src/main/ets/pages/Index.ets | 6 +++--- entry/src/main/resources/base/element/color.json | 3 ++- entry/src/main/resources/dark/element/color.json | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/entry/src/main/ets/pages/Index.ets b/entry/src/main/ets/pages/Index.ets index 545c7ab..11f79c1 100644 --- a/entry/src/main/ets/pages/Index.ets +++ b/entry/src/main/ets/pages/Index.ets @@ -1698,7 +1698,7 @@ struct Index { .fontSize(8) .fontColor(cell.dateMs === this.selectedDate ? (cell.hasEvent ? $r('app.color.button_text') : $r('app.color.text_secondary')) - : (cell.hasEvent ? $r('app.color.brand') : $r('app.color.text_hint'))) + : (cell.hasEvent ? $r('app.color.event_mark') : $r('app.color.text_hint'))) .fontWeight(cell.hasEvent ? FontWeight.Medium : FontWeight.Normal) .maxLines(1) } @@ -3265,13 +3265,13 @@ struct Index { .fontSize(8) .fontColor(cell.dateMs === this.selectedDate ? (cell.hasEvent ? $r('app.color.button_text') : $r('app.color.text_secondary')) - : (cell.hasEvent ? $r('app.color.brand') : $r('app.color.text_hint'))) + : (cell.hasEvent ? $r('app.color.event_mark') : $r('app.color.text_hint'))) .fontWeight(cell.hasEvent ? FontWeight.Medium : FontWeight.Normal) .maxLines(1) } else { // 宽屏:农历被省略,用一个小圆点表示(此时格子窄,圆点就在正中,不会有位置问题) Circle({ width: 4, height: 4 }) - .fill(cell.hasEvent ? $r('app.color.brand') : Color.Transparent) + .fill(cell.hasEvent ? $r('app.color.event_mark') : Color.Transparent) .opacity(cell.hasEvent ? 1 : 0) } } diff --git a/entry/src/main/resources/base/element/color.json b/entry/src/main/resources/base/element/color.json index 86defbe..9abde58 100644 --- a/entry/src/main/resources/base/element/color.json +++ b/entry/src/main/resources/base/element/color.json @@ -19,6 +19,7 @@ { "name": "grid_line", "value": "#14000000" }, { "name": "today_bg", "value": "#14007DFF" }, { "name": "selected_bg", "value": "#007DFF" }, - { "name": "chip_off_bg", "value": "#0D000000" } + { "name": "chip_off_bg", "value": "#0D000000" }, + { "name": "event_mark", "value": "#D93025" } ] } \ No newline at end of file diff --git a/entry/src/main/resources/dark/element/color.json b/entry/src/main/resources/dark/element/color.json index a2a7465..1f1292f 100644 --- a/entry/src/main/resources/dark/element/color.json +++ b/entry/src/main/resources/dark/element/color.json @@ -19,6 +19,7 @@ { "name": "grid_line", "value": "#1FFFFFFF" }, { "name": "today_bg", "value": "#330A84FF" }, { "name": "selected_bg", "value": "#0A84FF" }, - { "name": "chip_off_bg", "value": "#1FFFFFFF" } + { "name": "chip_off_bg", "value": "#1FFFFFFF" }, + { "name": "event_mark", "value": "#FF6B60" } ] }