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

QSystemTrayIcon on macOS does not invert color on selection

    XMLWordPrintable

Details

    • macOS
    • 395e2d9bc48941d64d7ca0e7998dcacb0a0606af (qt/qtbase/5.15)

    Description

      When selected, a menu bar icon should invert its color on macOS if the 'setIsMask' is True. However, the color remains the same.

      Edit: The color does not remain the same. But instead of turning white, the icon turns dark grey on selection.

      Example code in PySide:

      from PySide2 import QtCore, QtWidgets, QtGui
      
      app = QtWidgets.QApplication(["tray_icon_test"])
      app.setAttribute(QtCore.Qt.AA_UseHighDpiPixmaps)
      app.setQuitOnLastWindowClosed(False)
      
      icon = QtWidgets.QFileIconProvider().icon(QtCore.QFileInfo("/usr"))
      icon.setIsMask(True)
      tray_icon = QtWidgets.QSystemTrayIcon(icon)
      
      tray_icon.show()
      
      app.exec_()

       

      Example screenshots are attached.

      Attachments

        Issue Links

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

          Activity

            People

              vestbo Tor Arne Vestbø
              samschott Sam Schott
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes