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

Qml wrong color animation behavior when color have opacity

    XMLWordPrintable

    Details

    • Platform/s:
      iOS/tvOS/watchOS, Windows

      Description

      A Qml color animation from one full opaque color to a non full opaque color haven't the expected behavior.

      It seem's to go in the first time to an opaque color's version then go the real requested color. But on quick animation there is like a color "blinking" that's very not confortable for the user. 

      Please find here after a code to reproduce the bug.

       

          Rectangle {
              anchors.centerIn: parent
              width: 500
              height: 500
              color: "#2F3340"
      
              Rectangle {
                  anchors.centerIn: parent
                  width: 100
                  height: 100
      
                  // /!\ if we have a color opacity, there is a "blink" depending on the opacity
                  // the expected behavior should be a smooth animation from one color to another
                  // independently of the opacity of the colors.
                  color: ma.pressed ? "#0d6686ff" : "#1E2129" // 5% of opacity
      
                  // always bug but litle less visible
                  // color: ma.pressed ? "#1f6686ff" : "#1E2129" // 12% of opacity
      
                  // In the below line, we don't have this bug visible, seems to start to be not perceptible from 50%
                  // color: ma.pressed ? "#806686ff" : "#1E2129" // 50% of opacity, bug not perceptible by eyes
      
                  Behavior on color {ColorAnimation {duration: 100/*0*/}}
      
                  MouseArea {
                      id: ma
                      anchors.fill: parent
                  }
              }
          }
      

       

      Please find also a gif attached to this issue presenting the bug with a slow animation (1000ms). The gif is divided into 2 tests, the first with a dark background and the second with a light background. The bug doesn't seems to appear with a light background.  

        Attachments

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

          Activity

            People

            Assignee:
            qt.team.quick.subscriptions Qt Quick and Widgets Team
            Reporter:
            nathan_p Nathan PRIOR
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes