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

[win] [labs.platform] Standard menu icons looks wrong on DPR > 1

    XMLWordPrintable

Details

    • Windows
    • fdfb360f4 (dev), 0f89dbb57 (6.8), e47f19236 (6.7)

    Description

      With Qt 6.7 and above, the standard menu icons (like "edit-cut", "edit-copy", etc) looks wrong (bigger than expected) on screens with DPR > 1.

      E.g. at 175% system scale, it looks like this

      Code sample:

      import QtQuick
      import Qt.labs.platform as Labs
      
      Window {
          id: window
          visible: true
          width: 320
          height: 400
      
          Labs.Menu {
              id: editMenu
      
              Labs.MenuItem {
                  text: qsTr("Undo")
                  shortcut: StandardKey.Undo
                  icon.name: "edit-undo"
              }
      
              Labs.MenuItem {
                  text: qsTr("Redo")
                  shortcut: StandardKey.Redo
                  icon.name: "edit-redo"
              }
      
              Labs.MenuSeparator {}
      
              Labs.MenuItem {
                  text: qsTr("Cut")
                  shortcut: StandardKey.Cut
                  icon.name: "edit-cut"
              }
      
              Labs.MenuItem {
                  text: qsTr("Copy")
                  shortcut: StandardKey.Copy
                  icon.name: "edit-copy"
              }
      
              Labs.MenuItem {
                  text: qsTr("Paste")
                  shortcut: StandardKey.Paste
                  icon.name: "edit-paste"
              }
      
              Labs.MenuItem {
                  text: qsTr("Delete")
                  icon.name: "edit-delete"
              }
          }
      
          Component.onCompleted: {
              editMenu.open(window.contentItem)
          }
      
          TapHandler {
              acceptedButtons: Qt.RightButton
              onTapped: editMenu.open(window.contentItem)
          }
      }
      

      The problem can be reproduced both on Win 10 and Win 11.

      Attachments

        1. image-2024-07-26-12-13-22-055.png
          12 kB
          Vladimir Belyavsky
        2. screenshot-1.png
          7 kB
          Vladimir Belyavsky

        Issue Links

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

          Activity

            People

              vhilshei Volker Hilsheimer
              studiosus Vladimir Belyavsky
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes