fromTheme call should check first

This commit is contained in:
Veronica K. B. Olsen
2020-05-17 11:51:48 +02:00
parent 4a047b2098
commit de8c2b75ae
+2 -1
View File
@@ -293,7 +293,8 @@ class GuiIcons:
# If we're still here, try to set from system theme
if self.ICON_MAP[iconKey][1] is not None:
logger.verbose("Loading icon '%s' from system theme" % iconKey)
return QIcon().fromTheme(self.ICON_MAP[iconKey][1])
if QIcon().hasThemeIcon(self.ICON_MAP[iconKey][1]):
return QIcon().fromTheme(self.ICON_MAP[iconKey][1])
# Finally. we check if we have a fallback icon
if self.mainConf.guiDark: