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

Windows inactive accent colour changes when window loses focus

    XMLWordPrintable

Details

    • c52ada54c (dev), 303d99113 (dev), b90b624ce (dev)

    Description

      This doesn't match the behaviour of e.g. a native Switch whose background follows the accent colour, as its background colour will remain unchanged when the window loses focus.

      To reproduce, run the following snippet (after applying https://codereview.qt-project.org/c/qt/qtdeclarative/+/501482) and then open another window to make the Qt Quick window lose focus. The expected behaviour is that the Rectangle stays the colour it was (the accent colour) after the window loses focus. The actual behaviour is that it becomes #f0f0f0.

      import QtQuick
      import QtQuick.Controls
      
      ApplicationWindow {
          id: root
          width: 400
          height: 400
          visible: true
          title: rect.color
      
          Rectangle {
              id: rect
              implicitHeight: 32
              implicitWidth: 32
              color: palette.accent
          }
      }
      

      Attachments

        Issue Links

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

          Activity

            People

              wladimir.leuschner Wladimir Leuschner
              mitch_curtis Mitch Curtis
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes