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

Platform menu icon gets corrupted when changing screen scale factor

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.5.3, 6.6.3, 6.7.2
    • Quick: Controls 2
    • None
    • Windows

    Description

      Platform menu icon gets corrupted when changing screen scale factor if the menu item is disabled.

      Code sample:

      import QtQuick
      import QtQuick.Window
      import Qt.labs.platform as Platform
      
      Window {
          visible: true
      
          Platform.Menu {
              id: menu
              Platform.MenuItem {
                  text: 'Smile!'
                  icon.source: 'qrc:/smile.png'
                  enabled: false
              }
          }
      
          TapHandler {
              acceptedButtons: Qt.RightButton
              onTapped: menu.open()
          }
      }
      

      Full reproducer - reproducer.zip

      Steps to reproduce:
      1. Set screen scale factor to 125%
      2. Build and run sample program
      3. Click right mouse button and observe the menu, it looks as expected

      4. Change screen scale factor to 100%
      5. Observe the menu once again, the icon is corrupted - BUG

       

      Attachments

        1. black-bar-windows-11.png
          3 kB
          Mitch Curtis
        2. image-2024-03-15-18-53-35-544.png
          5 kB
          Vladimir Belyavsky
        3. image-2024-03-15-18-55-07-390.png
          3 kB
          Vladimir Belyavsky
        4. reproducer.zip
          3 kB
          Vladimir Belyavsky

        Issue Links

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

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              studiosus Vladimir Belyavsky
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes