style(月视图): 有事的日期标记色改为红色 #6

用户要求先看红色效果,蓝色太不显眼。

## 新增 event_mark 语义色
不直接复用现有的 `error`(#E02020):
  error 是语义色,到处被"失败/危险"复用。把日程标记挂上去,
  以后想调错误提示的红就会连带改掉日历标记,两件事被耦合。
  所以单独加一个 event_mark。

色值(农历只有 8px,小字对对比度要求高):
  · 浅色 #D93025 —— 比 #E02020 更沉,压在白底/浅灰底上更清晰,
    也不像"出错"那么刺眼
  · 深色 #FF6B60 —— 黑底上要亮一点才够,纯红会显脏

## 改动范围(3 处)
  · 月视图(非宽屏)农历文字
  · 月视图(宽屏)补位小圆点
  · 周视图农历文字

选中日仍用 button_text(白):那天日期数字坐在深红底上,
农历必须白色,否则红字压深底看不清。
This commit is contained in:
2026-11-02 17:06:21 +08:00
parent ff62cf7f00
commit fa3dbc6157
3 changed files with 7 additions and 5 deletions
+3 -3
View File
@@ -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)
}
}
@@ -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" }
]
}
@@ -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" }
]
}