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

No effect of setting color on a QStaticText or a QML element

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 4.7.4
    • 4.7.3
    • GUI: Text handling
    • None
    • f8560717dd56514269cfb081c7f4b94e231e10d7

    Description

      There are several related issues regarding QStaticText and the copied code in QML.

      One is QTBUG-18428 which was attempted fixed in QML. The fix, however, caused a regression, because it caused the initial color of the text layout to be cached. The result was that the only way to alter the color of a text would be to also alter its text, to force and override of the cache.

      The initial fix was wrong and should be reverted. The bug here was that when drawing underlined text, we would change the width of the current pen in order to draw the decorations. This would mark the pen as dirty, thus storing the current color in the text item, something which should only happen if the actual text color has changed. This can be fixed by checking that the text color has actually changed before marking the pen as dirty. The same fix is required for QStaticText.

      Attachments

        For Gerrit Dashboard: QTBUG-20159
        # Subject Branch Project Status CR V

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            esabraha Eskil Abrahamsen Blomfeldt
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes