1. TortoiseHg
  2. TortoiseHg
  3. thg


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

View file
  • Ignore whitespace
                             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()
-    getmenuicon = geticon
+getmenuicon = geticon
 def getoverlaidicon(base, overlay):

File tortoisehg/hgqt/workbench.py

View file
  • Ignore whitespace
             self.dockMenu.addAction(_('&Open Repository...'),
+            # 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