just a thought :3

This commit is contained in:
anne 2023-06-25 00:59:59 +02:00
parent 906cd60ff2
commit 1f1db15075

View file

@ -1992,8 +1992,6 @@ class PesterWindow(MovingWindow):
self.choosetheme = PesterChooseTheme(self.config, self.theme, self)
self.choosetheme.exec()
def initTheme(self, theme):
# First doing the fonts because any style may depend on it
QtGui.QFontDatabase.removeAllApplicationFonts() # GOODBYE previous fonts
@ -2009,8 +2007,11 @@ class PesterWindow(MovingWindow):
fontID = QtGui.QFontDatabase.addApplicationFont(font_path)
if fontID == -1:
PchumLog.error("Failed loading font: " + font_path)
# TODO? Maybe make this spawn an error popup
else:
PchumLog.debug(f"Font families: {(QtGui.QFontDatabase.applicationFontFamilies(fontID))} (id: {fontID})")
PchumLog.debug(
f"Font families: {(QtGui.QFontDatabase.applicationFontFamilies(fontID))} (id: {fontID})"
)
self.resize(*theme["main/size"])
self.setWindowIcon(PesterIcon(theme["main/icon"]))