Fix image prefix path on Windows

This commit is contained in:
2025-05-12 18:30:50 -04:00
parent 2557ad236e
commit f76ad67108

View File

@@ -649,7 +649,7 @@ if __name__ == "__main__":
# NUSGet look nice and pretty. # NUSGet look nice and pretty.
app.setStyle("fusion") app.setStyle("fusion")
stylesheet = open(os.path.join(os.path.dirname(__file__), "resources", "style.qss")).read() stylesheet = open(os.path.join(os.path.dirname(__file__), "resources", "style.qss")).read()
image_path_prefix = os.path.join(os.path.dirname(__file__), "resources") image_path_prefix = pathlib.Path(os.path.join(os.path.dirname(__file__), "resources")).resolve().as_posix()
stylesheet = stylesheet.replace("{IMAGE_PREFIX}", image_path_prefix) stylesheet = stylesheet.replace("{IMAGE_PREFIX}", image_path_prefix)
app.setStyleSheet(stylesheet) app.setStyleSheet(stylesheet)