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

Changing QtQuick Controls 2 Menu enabled State Breaks Coloring

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.12.2, 5.13.2, 5.14.0 Alpha
    • 5.12.0
    • Quick: Controls 2
    • None
    • Windows 10
      Qt 5.12.0 MSVC2017x64
    • Linux/X11, Windows
    • 4e5601ac1c7aec6aba9ba09fe7adb7a0462da2f0 (qt/qtquickcontrols2/5.12)

    Description

      Changing the enabled state of a context menu (QtQuick Controls 2 Menu) does not appropriately update all the Menu colors (this bug appears to only exist for the Fusion style--I have tested Material and Universal besides, both of which appear to work correctly). The most notable color that does not get updated is the background color.

      EDIT:
      Try running the already attached example. It includes detailed notes in the comments of main.qml as to how to observe this bug in action. As described above, specifically "Changing the enabled state of a context Menu" (as in dynamically--not just setting a different initial value) is the trigger.

      In the attached example, you should see a Menu whose enabled state changes from initial false to true just prior to being opened retain the purple background color from the "disabled" palette colors. If no disabled palette background colors are set, it will instead retain the disabled color from your system.

      You can toggle the enabled setter and the initial enabled value between true and false to see the results of the different combinations. Only when the enabled state is dynamically changed (from true -> false or from false -> true) do you start to see the bug. Also, the bug appears to exist for Fusion; I can't be sure about the other styles. Material and Universal "appear" to work correctly, but that could just be due to their active and disabled menu states sharing the same background color.

      This was additionally verified on Linux last night.

      Attachments

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

        Activity

          People

            mitch_curtis Mitch Curtis
            dchamberlain David Chamberlain
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes