From 74e75e93afe2475c5002aab6f43ef65430e65efd Mon Sep 17 00:00:00 2001 From: monitor1394 Date: Mon, 19 Feb 2024 08:51:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D`Tooltip`=E7=9A=84=E5=9C=86?= =?UTF-8?q?=E7=82=B9=E6=A0=87=E8=AE=B0=E4=B8=8D=E4=BC=9A=E8=87=AA=E9=80=82?= =?UTF-8?q?=E5=BA=94=E9=A2=9C=E8=89=B2=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Documentation~/zh/changelog.md | 2 ++ Runtime/Component/Tooltip/TooltipView.cs | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Documentation~/zh/changelog.md b/Documentation~/zh/changelog.md index 39513fae..dc4de487 100644 --- a/Documentation~/zh/changelog.md +++ b/Documentation~/zh/changelog.md @@ -71,6 +71,8 @@ slug: /changelog ## master +* (2024.02.19) 修复`Tooltip`的圆点标记不会自适应颜色的问题 + ## v3.10.0 版本要点: diff --git a/Runtime/Component/Tooltip/TooltipView.cs b/Runtime/Component/Tooltip/TooltipView.cs index 64fe0c4a..d849c4a7 100644 --- a/Runtime/Component/Tooltip/TooltipView.cs +++ b/Runtime/Component/Tooltip/TooltipView.cs @@ -76,6 +76,7 @@ namespace XCharts.Runtime title.SetText(data.title); m_ColumnMaxWidth.Clear(); + var contentLabelStyle0 = tooltip.GetContentLabelStyle(0); for (int i = 0; i < data.param.Count; i++) { var item = GetItem(i); @@ -92,7 +93,7 @@ namespace XCharts.Runtime column.SetActive(true); column.SetText(param.columns[j]); - if (j == 0 && ChartHelper.IsClearColor(column.text.GetColor())) + if (j == 0 && contentLabelStyle0 && ChartHelper.IsClearColor(contentLabelStyle0.textStyle.color)) column.text.SetColor(param.color); if (j >= m_ColumnMaxWidth.Count)