Minor changes to statusbar layout

This commit is contained in:
Veronica K. B. Olsen
2019-11-08 13:38:08 +01:00
parent a7da476c9e
commit aef6b339e1
2 changed files with 23 additions and 13 deletions
+8 -3
View File
@@ -17,7 +17,7 @@ import nw
from os import path, listdir
from PyQt5.QtWidgets import qApp
from PyQt5.QtGui import QPalette, QColor, QIcon
from PyQt5.QtGui import QPalette, QColor, QIcon, QPixmap
from nw.constants import nwAlert
@@ -253,7 +253,7 @@ class Theme:
try:
confParser.read_file(open(themeConf, mode="r", encoding="utf8"))
except Exception as e:
self.theParent.makeAlert(["Could not load theme config file",str(e)],nwAlert.ERROR)
self.theParent.makeAlert(["Could not load theme config file.",str(e)],nwAlert.ERROR)
continue
themeName = ""
if confParser.has_section("Main"):
@@ -281,7 +281,7 @@ class Theme:
try:
confParser.read_file(open(syntaxPath, mode="r", encoding="utf8"))
except Exception as e:
self.theParent.makeAlert(["Could not load syntax file",str(e)],nwAlert.ERROR)
self.theParent.makeAlert(["Could not load syntax file.",str(e)],nwAlert.ERROR)
return []
syntaxName = ""
if confParser.has_section("Main"):
@@ -299,6 +299,11 @@ class Theme:
return self.themeIcons[iconName]
return QIcon()
def getIconPixmap(self, iconName, iconSize=None):
if iconName in self.themeIcons:
return self.themeIcons[iconName].pixmap()
return QPixmap()
##
# Internal Functions
##