just a thought :3
This commit is contained in:
parent
906cd60ff2
commit
1f1db15075
1 changed files with 7 additions and 6 deletions
|
@ -1992,8 +1992,6 @@ class PesterWindow(MovingWindow):
|
||||||
self.choosetheme = PesterChooseTheme(self.config, self.theme, self)
|
self.choosetheme = PesterChooseTheme(self.config, self.theme, self)
|
||||||
self.choosetheme.exec()
|
self.choosetheme.exec()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def initTheme(self, theme):
|
def initTheme(self, theme):
|
||||||
# First doing the fonts because any style may depend on it
|
# First doing the fonts because any style may depend on it
|
||||||
QtGui.QFontDatabase.removeAllApplicationFonts() # GOODBYE previous fonts
|
QtGui.QFontDatabase.removeAllApplicationFonts() # GOODBYE previous fonts
|
||||||
|
@ -2005,12 +2003,15 @@ class PesterWindow(MovingWindow):
|
||||||
# ~lisanne : loads fonts from the `main/fonts` key in a theme
|
# ~lisanne : loads fonts from the `main/fonts` key in a theme
|
||||||
# Note that this wont load fonts from inherited themes
|
# 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`
|
# 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)
|
fontID = QtGui.QFontDatabase.addApplicationFont(font_path)
|
||||||
if fontID == -1:
|
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:
|
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.resize(*theme["main/size"])
|
||||||
self.setWindowIcon(PesterIcon(theme["main/icon"]))
|
self.setWindowIcon(PesterIcon(theme["main/icon"]))
|
||||||
|
|
Loading…
Reference in a new issue