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

stable qtlib: geticon() from system theme if available

Changeset a26ce41e8d78

Parent cb9aa4e17b8f

by Yuya Nishihara

Changes to one file · Browse files at a26ce41e8d78 Showing diff from parent cb9aa4e17b8f Diff from another changeset...

 
254
255
256
257
 
258
259
 
 
 
260
261
262
 
254
255
256
 
257
258
259
260
261
262
263
264
265
@@ -254,9 +254,12 @@
  Return a QIcon for the specified name. (the given 'name' parameter   must *not* provide the extension).   - This searches for the icon from Qt resource or icons directory, + This searches for the icon from theme, Qt resource or icons directory,   named as 'name.(svg|png|ico)'.   """ + if QIcon.hasThemeIcon(name): + return QIcon.fromTheme(name) +   # TODO: icons should be placed at single location before release   def findicon(name):   for pfx in (':/icons', os.path.join(paths.get_icon_path(), 'svg'),