Commits

André Sintzoff  committed 15e4386

workbench: don't display icons in menu on Mac OS X

Currently, the function getmenuicon is used for this purpose.
Unfortunately, for actions simultaneously attached to a menu item and to a
toolbar, that function can't be used.

Thanks to qt_mac_set_menubar_icons, the menu icons can always be hidden.
See http://qt-project.org/doc/qt-4.8/exportedfunctions.html

  • Participants
  • Parent commits aa35ba7
  • Branches stable

Comments (0)

Files changed (2)

File tortoisehg/hgqt/qtlib.py

                             or QIcon(':/icons/fallback.svg'))
         return _iconcache[name]
 
-if sys.platform == 'darwin':
-    # On Mac OS X, we do not want icons on menus
-    def getmenuicon(name):
-        return QIcon()
-else:
-    getmenuicon = geticon
+getmenuicon = geticon
 
 
 def getoverlaidicon(base, overlay):

File tortoisehg/hgqt/workbench.py

             self.dockMenu.addAction(_('&Open Repository...'),
                                     self.openRepository)
             qt_mac_set_dock_menu(self.dockMenu)
+            # On Mac OS X, we do not want icons on menus
+            qt_mac_set_menubar_icons(False)
 
         # Create the actions that will be displayed on the context menu
         self.createActions()