diff --git a/LunaTranslator/LunaTranslator/LunaTranslator.py b/LunaTranslator/LunaTranslator/LunaTranslator.py index f5d456ce..bc7c7bc9 100644 --- a/LunaTranslator/LunaTranslator/LunaTranslator.py +++ b/LunaTranslator/LunaTranslator/LunaTranslator.py @@ -1049,6 +1049,10 @@ class MAINUI: + (globalconfig["settingfonttype"]) + "' ; }" ) + style += f""" + QListWidget {{ + font:{globalconfig["settingfontsize"] + 4}pt {globalconfig["settingfonttype"]}; }} + """ self.commonstylebase.setStyleSheet(style) def loadui(self): diff --git a/LunaTranslator/LunaTranslator/gui/setting.py b/LunaTranslator/LunaTranslator/gui/setting.py index 16215f03..5dc8b6ec 100644 --- a/LunaTranslator/LunaTranslator/gui/setting.py +++ b/LunaTranslator/LunaTranslator/gui/setting.py @@ -137,14 +137,9 @@ class Setting(closeashidewindow): ) self.setCentralWidget(self.tab_widget) do() - self.tab_widget.setStyleSheet( - f"""QListWidget {{ - font:{globalconfig["settingfontsize"] + 2}pt {globalconfig["settingfonttype"]}; }} - """ - ) width = 0 fn = QFont() - fn.setPointSizeF(globalconfig["settingfontsize"] + 2) + fn.setPointSizeF(globalconfig["settingfontsize"] + 4) fn.setFamily(globalconfig["settingfonttype"]) fm = QFontMetrics(fn) for title in self.tab_widget.titles: