From 7848a2014a5a778911710adfd33c60c7a82cce50 Mon Sep 17 00:00:00 2001 From: miruka Date: Sat, 30 Jan 2021 16:21:16 -0400 Subject: [PATCH] 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 --- src/backend/user_files.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/backend/user_files.py b/src/backend/user_files.py index 08a8fd42..b2957f28 100644 --- a/src/backend/user_files.py +++ b/src/backend/user_files.py @@ -519,7 +519,10 @@ class Theme(UserDataFile): @property 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: byte_content = pyotherside.qrc_get_file_contents(path)