QTextDocumentLayout: Fix regression in table column width calculation
87748cc18e
introduces rounding of column
widths to avoid table border render artifacts.
For variable columns we must make sure that the maxWidth (= unwrapped
content width) is not rounded down as this can cause erroneous
wrapping of the content at rendering time.
Fixes: QTBUG-43589
Change-Id: Iee155702a12374116a63050e5025df91f097a8e4
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This commit is contained in:
parent
80179e3b7e
commit
81554aca81
@ -1707,6 +1707,12 @@ recalc_minmax_widths:
|
||||
if (maxW == QFIXED_MAX)
|
||||
continue;
|
||||
|
||||
// for variable columns the maxWidth will later be considered as the
|
||||
// column width (column width = content width). We must avoid that the
|
||||
// pixel-alignment rounding step floors this value and thus the text
|
||||
// rendering later erroneously wraps the content.
|
||||
maxW = maxW.ceil();
|
||||
|
||||
widthToDistribute = maxW;
|
||||
for (int n = 0; n < cspan; ++n) {
|
||||
const int col = i + n;
|
||||
|
Loading…
Reference in New Issue
Block a user