diff --git a/Documentation~/zh/changelog.md b/Documentation~/zh/changelog.md index c27f5fbd..d38b6a7f 100644 --- a/Documentation~/zh/changelog.md +++ b/Documentation~/zh/changelog.md @@ -70,7 +70,8 @@ slug: /changelog ## master -* (2023.12.26) 增加`BorderStyle`边框样式 +* (2024.01.07) 修复`Tooltop`的第一个`ContentLabelStyle`设置`color`无效的问题 +* (2024.01.01) 增加`BorderStyle`边框样式 * (2023.12.26) 增加`Heatmap`的`maxCache`参数支持 * (2023.12.25) 优化`Line`开启`clip`时绘制的顶点数 * (2023.12.22) 修复`Scatter`散点图部分边界数据不显示的问题 diff --git a/Runtime/Component/Tooltip/TooltipView.cs b/Runtime/Component/Tooltip/TooltipView.cs index 410cb1e9..64fe0c4a 100644 --- a/Runtime/Component/Tooltip/TooltipView.cs +++ b/Runtime/Component/Tooltip/TooltipView.cs @@ -92,7 +92,7 @@ namespace XCharts.Runtime column.SetActive(true); column.SetText(param.columns[j]); - if (j == 0) + if (j == 0 && ChartHelper.IsClearColor(column.text.GetColor())) column.text.SetColor(param.color); if (j >= m_ColumnMaxWidth.Count) diff --git a/Runtime/Internal/Object/ChartText.cs b/Runtime/Internal/Object/ChartText.cs index c01b68a8..cc32d38f 100644 --- a/Runtime/Internal/Object/ChartText.cs +++ b/Runtime/Internal/Object/ChartText.cs @@ -70,7 +70,7 @@ namespace XCharts.Runtime #if dUI_TextMeshPro if (m_TMPText != null) m_TMPText.fontSize = fontSize; #else - if (m_Text != null) m_Text.fontSize = (int) fontSize; + if (m_Text != null) m_Text.fontSize = (int)fontSize; #endif } @@ -104,6 +104,16 @@ namespace XCharts.Runtime #endif } + public Color GetColor() + { +#if dUI_TextMeshPro + if (m_TMPText != null) return m_TMPText.color; +#else + if (m_Text != null) return m_Text.color; +#endif + return Color.clear; + } + public void SetLineSpacing(float lineSpacing) { #if dUI_TextMeshPro diff --git a/Runtime/XUGL/UGL.cs b/Runtime/XUGL/UGL.cs index 99f28570..4e901a88 100644 --- a/Runtime/XUGL/UGL.cs +++ b/Runtime/XUGL/UGL.cs @@ -1067,7 +1067,7 @@ namespace XUGL false, smoothness, false); if (borderWidth > 0) { - UGL.DrawBorder(vh, rect, borderWidth, borderColor, rotate, cornerRadius); + UGL.DrawBorder(vh, rect, borderWidth, borderColor, rotate, cornerRadius, true, smoothness); } }