Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.4.3, 5.0.1, 5.0.2
-
qtbase/ad443dfb1d8e9096c4913686aa2ed0bc9b3f5de7, qt/b12e459ea17f083b01ad0676ee552b96aff14b59
Description
t4id; 241849
When using QTextEdit and changing the size of the text, a bullet on the same line will scale with the text. If the text size is increased beyond 36, the left hand side of the bullet is clipped.
In Qt the bullet related drawing/ calculation is done in the following function
void QTextDocumentLayoutPrivate::drawListItem(const QPointF &offset, QPainter *painter, const QAbstractTextDocumentLayout::PaintContext &context, QTextBlock bl, const QTextCharFormat *selectionFormat) const
File: C:\Qt\4.4.1\src\gui\text\qtextdocumentlayout.cpp
Line : 1301
This function is triggered from QTextDocumentLayoutPrivate::drawBlock (
same file, line :1218). We may need to modify qtextlayout.cpp and
qtextengine.cpp as well for text bounding rect.
Draw block is triggered for every text line and generally without
bullets the x & y co-ordinates are (0,0) but when ever we add bullets
there is an offset of 40 in the x position. Qt always tries to draw the
bullet between 0 to 40 (x co-ordinate), for higer font sizes the bullet
width is quite high and bullet x-co-ordinate goes negative hence the
clipping. Ideally Qt should dynamically calculate the bullet width and
accordingly set the x co-ordinate offset. "
Attachments
Issue Links
- is duplicated by
-
QTBUG-80565 Bullet points are rendered outside of the viewport with larger fonts
- Closed
- relates to
-
QTBUG-92445 Markdown smashes nested formatting inside lists
- Closed
For Gerrit Dashboard: QTBUG-5111 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
55289,7 | Fix clipping of QTextList decorators. | stable | qt/qtbase | Status: MERGED | +2 | 0 |
56895,2 | Fix clipping of QTextList decorators. | 4.8 | qt/qt | Status: MERGED | +2 | 0 |