Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.0, 2.0.1, and 2.0.2

stable qtlib: add getmenuicon(name)

This function behaves as geticon() except on Mac OS X. On that
platform, it returns a null icon. Use of getmenuicon() will avoid
displaying an icon in menu items.

Changeset 20ebc6fcc55e

Parent 769b71619e09

by André Sintzoff

Changes to one file · Browse files at 20ebc6fcc55e Showing diff from parent 769b71619e09 Diff from another changeset...

 
6
7
8
 
9
10
11
 
298
299
300
 
 
 
 
 
301
302
303
 
6
7
8
9
10
11
12
 
299
300
301
302
303
304
305
306
307
308
309
@@ -6,6 +6,7 @@
 # GNU General Public License version 2 or any later version.    import os +import sys  import atexit  import shutil  import stat @@ -298,6 +299,11 @@
  or QIcon(':/icons/fallback.svg'))   return _iconcache[name]   +def getmenuicon(name): + if sys.platform == 'darwin': + return QIcon() + return geticon(name) +  _pixmapcache = {}    def getpixmap(name, width=16, height=16):