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

QGlyphRun boundingRect is offset in QQuickTextNode

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.0.0
    • 5.0.0
    • GUI: Text handling
    • None
    • Ubuntu 10.04, xcb
    • d354f7d51444fffd1c3314d2df3622fd1f77113d

    Description

      The boundingRect returned by the QGlyphRuns in a QQuickTextNode when laying out a QTextDocument appear to be below the actual position of the text. For example a run at the start of the document will have the bounding rect (0,14 41x14).

      This is problematic when positioning image nodes within a text node as they are positioned relative to the bounding rect of the previous node which is below the baseline if it's a text node and above it if it's an image node. Translating the text nodes up by their ascent compensates for this and ensures all node's bounding boxes are at (baseline - ascent).

      Attachments

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

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            denexter Andrew den Exter (closed Nokia identity) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes