summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSanthosh Kumar <santhosh.kumar.selvaraj@qt.io>2025-06-04 12:33:30 +0200
committerSanthosh Kumar <santhosh.kumar.selvaraj@qt.io>2025-06-05 23:58:00 +0200
commit2e0dc22bdb46f94a516e834ad4fda2b93aada352 (patch)
tree2d4287297015c658bf5704c905682ed10f3e3a6f /src
parent38ce4ad2f863fbd312334e239c0362ce3657830c (diff)
Fix regression in drawing table cell border when border-collapse enabledHEADdev
The patch 732962d604e7469f9a9f02fe0cd3d1fd04caddb8 enables drawing a border around cells within the table when set through CSS styling. But this caused a regression when border-collapse is enabled without setting the cell border. This patch enables drawing borders for table cells when either of those conditions is satisfied. Fixes: QTBUG-136590 Pick-to: 6.10 6.9 6.8 Change-Id: Ibf43c404439c9fee1cfd2b40789150edb76c6971 Reviewed-by: Nils Jeisecke <nils.jeisecke@saltation.com> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Diffstat (limited to 'src')
-rw-r--r--src/gui/text/qtextdocumentlayout.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qtextdocumentlayout.cpp b/src/gui/text/qtextdocumentlayout.cpp
index ef91decc9ff..dc05ef0bac3 100644
--- a/src/gui/text/qtextdocumentlayout.cpp
+++ b/src/gui/text/qtextdocumentlayout.cpp
@@ -1894,7 +1894,7 @@ void QTextDocumentLayoutPrivate::drawTableCell(const QRectF &cellRect, QPainter
}
// paint over the background - otherwise we would have to adjust the background paint cellRect for the border values
- if (cellBorderConfigured)
+ if (cellBorderConfigured || (td->borderCollapse && td->border != 0))
drawTableCellBorder(cellRect, painter, table, td, cell);
const QFixed verticalOffset = td->cellVerticalOffsets.at(c + r * table->columns());