Fix custom theme not found when compiled with QRC

If the application was compiled with QRC (i.e. CONFIG+=dev), a theme
setting that wasn't one of the default theme would fail to be read.

Originally commit cf463f24786566c5ec04a6823e9917975ba2b265,
accidentally thrown out before release
This commit is contained in:
miruka 2021-01-30 16:21:16 -04:00
parent 3daeae324b
commit 7848a2014a

View File

@ -519,7 +519,10 @@ class Theme(UserDataFile):
@property @property
def default_data(self) -> str: def default_data(self) -> str:
path = f"src/themes/{self.filename}" if self.filename in ("Midnight.qpl", "Glass.qpl"):
path = f"src/themes/{self.filename}"
else:
path = "src/themes/Midnight.qpl"
try: try:
byte_content = pyotherside.qrc_get_file_contents(path) byte_content = pyotherside.qrc_get_file_contents(path)