diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2021-12-06 12:49:10 +0100 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2021-12-06 21:55:06 +0100 |
commit | 220510a885747bb084e23dc51ea31e35e4fd115e (patch) | |
tree | dd062b0f1d8192956819902c092a3a50e8577182 /src/gui/text | |
parent | d69a4e95b1a30a505e70000305213b6727b85630 (diff) |
Fix qtdeclarative baseline test failure for text tables
Amend 97cfd4940157817dd761fd02f2e6da4afc5b4a30, which resulted in
incorrectly laid out tables in Text elements.
Reported by the baseline test for the scenegraph. Not reproducible using
a QtWidget text widget, so no unit-test added here.
Pick-to: 6.2 5.15
Task-number: QTBUG-86671
Task-number: QTBUG-97463
Change-Id: I607b1fea3fb5923f81f05a3646bafebec3dcf3b5
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src/gui/text')
-rw-r--r-- | src/gui/text/qtextdocumentlayout.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/text/qtextdocumentlayout.cpp b/src/gui/text/qtextdocumentlayout.cpp index ff0c035a90..1cc891ed5a 100644 --- a/src/gui/text/qtextdocumentlayout.cpp +++ b/src/gui/text/qtextdocumentlayout.cpp @@ -2366,10 +2366,10 @@ QTextLayoutStruct QTextDocumentLayoutPrivate::layoutCell(QTextTable *t, const QT floatMinWidth = qMax(floatMinWidth, cd->minimumWidth); } - // constraint the maximumWidth by the minimum width of the fixed size floats, to - // keep them visible + // constraint the maximum/minimumWidth by the minimum width of the fixed size floats, + // to keep them visible layoutStruct.maximumWidth = qMax(layoutStruct.maximumWidth, floatMinWidth); - layoutStruct.minimumWidth = floatMinWidth; + layoutStruct.minimumWidth = qMax(layoutStruct.minimumWidth, floatMinWidth); // as floats in cells get added to the table's float list but must not affect // floats in other cells we must clear the list here. |