105 @param name name of the translation engine |
107 @param name name of the translation engine |
106 @type str |
108 @type str |
107 @return engine icon |
109 @return engine icon |
108 @rtype QIcon |
110 @rtype QIcon |
109 """ |
111 """ |
|
112 if e5App().usesDarkPalette(): |
|
113 iconSuffix = "dark" |
|
114 else: |
|
115 iconSuffix = "light" |
110 if name in supportedEngineNames(): |
116 if name in supportedEngineNames(): |
111 return UI.PixmapCache.getIcon(os.path.join( |
117 icon = UI.PixmapCache.getIcon(os.path.join( |
112 os.path.dirname(__file__), "..", "icons", "engines", |
118 os.path.dirname(__file__), "..", "icons", "engines", |
113 "{0}.png".format(name))) |
119 "{0}-{1}".format(name, iconSuffix))) |
|
120 if icon.isNull(): |
|
121 # try variant without suffix |
|
122 icon = UI.PixmapCache.getIcon(os.path.join( |
|
123 os.path.dirname(__file__), "..", "icons", "engines", |
|
124 "{0}".format(name))) |
|
125 return icon |
114 else: |
126 else: |
115 return QIcon() |
127 return QIcon() |
116 |
128 |
117 |
129 |
118 def getKeyUrl(name): |
130 def getKeyUrl(name): |