Skip to content
  • Eskil Abrahamsen Blomfeldt's avatar
    Fix text color in some cases of QML and QStaticText · 3296449d
    Eskil Abrahamsen Blomfeldt authored
    This reverts 518c2a58ed6fdfd7449cb4476aa8ea0d32ad16e3 which caused a
    regression.
    
    When writing systems are mixed and an underline is set on the font,
    QPainter will set a pen with the current color and a new width on
    itself before drawing the decoration. This would cause the recorder
    in QStaticText to mark the pen as dirty, saving the current pen
    color in all subsequent text items. The effect was e.g. that in QML
    the cached color would override the current one, making it impossible
    to change the color on the text without forcing a relayout somehow.
    
    The right fix is to only mark the pen as dirty when its color actually
    changes.
    
    Task-number: QTBUG-20159
    Change-Id: I0db1966787f543695bcba4a0c13328ae0a17625b
    Reviewed-by: Jiang Jiang
    Reviewed-on: http://codereview.qt.nokia.com/875
    
    
    Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
    Reviewed-by: default avatarEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
    3296449d