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

System tray icon style problem on OS X 10.10 Yosemite

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.6.0 Alpha
    • 5.4.0 Beta
    • QPA
    • None
    • OS X 10.10
    • macOS
    • 130c2baa9376dcf525916620294bd9996bdf41f3

    Description

      In order to have the system tray icon work on OS X the image/icon needs to be set as a template image (see https://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSImage_Class/index.html#//apple_ref/occ/instm/NSImage/setTemplate:).
      As of OS X 10.10 Yosemite the user may choose a dark dock and menu bar variant instead of the usual light gray. System tray icons for OS X have usually been black. Those are nearly unspottable on the dark menubar.
      When setting the template property to true on NSImages, the image will be considered something like an alpha mask and colors (like black or white) will be applied depending on the current environment. Thus, system tray icons will render black on the default menu bar and white on the dark menu bar when the template property is set to true.

      Attachments

        1. black-on-dark.png
          black-on-dark.png
          7 kB
        2. dark-mode-setting.png
          dark-mode-setting.png
          27 kB
        3. white-on-dark.png
          white-on-dark.png
          7 kB

        Issue Links

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

          Activity

            People

              zakalawe James Turner
              mulvad Christian Sejersen
              Votes:
              8 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes