修复Tooltop的第一个ContentLabelStyle设置color无效的问题

This commit is contained in:
monitor1394
2024-01-07 22:13:03 +08:00
parent 91db00a173
commit c3489fbc1e
4 changed files with 15 additions and 4 deletions

View File

@@ -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`散点图部分边界数据不显示的问题

View File

@@ -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)

View File

@@ -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

View File

@@ -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);
}
}