修复边框渲染与合并单元格的问题

This commit is contained in:
2026-07-29 11:32:53 +08:00
parent 2fb8af52a6
commit 5917c0361b
7 changed files with 185 additions and 139 deletions
@@ -198,15 +198,22 @@ namespace XericUI.XTable.Rendering.Component
private bool IsMergedInteriorBoundary(XTableBorderAxis axis, int fixedIndex, int index)
{
if (m_TableData == null) return false;
int rowA, colA, rowB, colB;
if (axis == XTableBorderAxis.Horizontal)
{
if (fixedIndex <= 0 || fixedIndex >= m_RowHeights.Length) return false;
return m_TableData.IsCellMerged(fixedIndex - 1, index)
|| m_TableData.IsCellMerged(fixedIndex, index);
rowA = fixedIndex - 1; colA = index;
rowB = fixedIndex; colB = index;
}
if (fixedIndex <= 0 || fixedIndex >= m_ColWidths.Length) return false;
return m_TableData.IsCellMerged(index, fixedIndex - 1)
|| m_TableData.IsCellMerged(index, fixedIndex);
else
{
if (fixedIndex <= 0 || fixedIndex >= m_ColWidths.Length) return false;
rowA = index; colA = fixedIndex - 1;
rowB = index; colB = fixedIndex;
}
return m_TableData.TryGetMergeRect(rowA, colA, out int sourceRowA, out int sourceColA, out _, out _)
&& m_TableData.TryGetMergeRect(rowB, colB, out int sourceRowB, out int sourceColB, out _, out _)
&& sourceRowA == sourceRowB && sourceColA == sourceColB;
}
}
}