Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-5111

QTextEdit bullets are clipped when increasing text size > 36

    XMLWordPrintable

Details

    • 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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              leonlee Leonard Lee
              jasmcdon Jason McDonald (Closed Nokia Identity. Please assign to "macadder" instead) (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes