Fallnack icon should still work if no dark icon is specified
This commit is contained in:
+5
-2
@@ -76,6 +76,7 @@ class GuiIcons:
|
|||||||
"cls_trash" : (QStyle.SP_DriveHDIcon, "drive-harddisk"),
|
"cls_trash" : (QStyle.SP_DriveHDIcon, "drive-harddisk"),
|
||||||
"proj_document" : (QStyle.SP_FileIcon, "x-office-document"),
|
"proj_document" : (QStyle.SP_FileIcon, "x-office-document"),
|
||||||
"proj_folder" : (QStyle.SP_DirIcon, "folder"),
|
"proj_folder" : (QStyle.SP_DirIcon, "folder"),
|
||||||
|
"proj_nwx" : (None, None),
|
||||||
"status_lang" : (None, None),
|
"status_lang" : (None, None),
|
||||||
"status_time" : (None, None),
|
"status_time" : (None, None),
|
||||||
"status_stats" : (None, None),
|
"status_stats" : (None, None),
|
||||||
@@ -295,8 +296,10 @@ class GuiIcons:
|
|||||||
# Finally. we check if we have a fallback icon
|
# Finally. we check if we have a fallback icon
|
||||||
if self.mainConf.guiDark:
|
if self.mainConf.guiDark:
|
||||||
fbackIcon = path.join(self.mainConf.iconPath, self.fbackName, "%s-dark.svg" % iconKey)
|
fbackIcon = path.join(self.mainConf.iconPath, self.fbackName, "%s-dark.svg" % iconKey)
|
||||||
else:
|
if path.isfile(fbackIcon):
|
||||||
fbackIcon = path.join(self.mainConf.iconPath, self.fbackName, "%s.svg" % iconKey)
|
logger.verbose("Loading icon '%s' from fallback theme" % iconKey)
|
||||||
|
return QIcon(fbackIcon)
|
||||||
|
fbackIcon = path.join(self.mainConf.iconPath, self.fbackName, "%s.svg" % iconKey)
|
||||||
if path.isfile(fbackIcon):
|
if path.isfile(fbackIcon):
|
||||||
logger.verbose("Loading icon '%s' from fallback theme" % iconKey)
|
logger.verbose("Loading icon '%s' from fallback theme" % iconKey)
|
||||||
return QIcon(fbackIcon)
|
return QIcon(fbackIcon)
|
||||||
|
|||||||
Reference in New Issue
Block a user