From 1f1db15075cb9e79dd1b1545d7014c663e3cf306 Mon Sep 17 00:00:00 2001 From: anne Date: Sun, 25 Jun 2023 00:59:59 +0200 Subject: [PATCH] just a thought :3 --- pesterchum.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pesterchum.py b/pesterchum.py index a523d06..1039bea 100755 --- a/pesterchum.py +++ b/pesterchum.py @@ -1992,11 +1992,9 @@ 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 + QtGui.QFontDatabase.removeAllApplicationFonts() # GOODBYE previous fonts QtGui.QFontDatabase.addApplicationFont( os.path.join("fonts", "alternian", "AllisDaedric-VYWz.otf") ) # haha oops we still need that one!!! for now!! (check `~lisanne "alternian lol" TODO` up above) @@ -2005,12 +2003,15 @@ class PesterWindow(MovingWindow): # ~lisanne : loads fonts from the `main/fonts` key in a theme # Note that this wont load fonts from inherited themes # that seems fine imo, esp since u could still load them through `$path/../inheritedtheme/somefont.ttf` - PchumLog.debug("Loading font "+ font_path) + PchumLog.debug("Loading font " + font_path) fontID = QtGui.QFontDatabase.addApplicationFont(font_path) if fontID == -1: - PchumLog.error("Failed loading font: "+font_path) + 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"]))