1
1
mirror of https://github.com/KenanZhu/AutoLibrary.git synced 2026-06-18 07:23:03 +08:00

fix(gui): 修复保存主题时色调模式与主题 need_theme 不一致的问题

- 将 THEME 配置写入移至 syncRadioFromNeedTheme 之后
- 确保保存的色调模式值与主题实际兼容值一致,避免重启后错配
This commit is contained in:
2026-05-30 22:30:31 +08:00
parent 10d731518a
commit 2d77cbec79
+4 -2
View File
@@ -136,7 +136,9 @@ class ALSettingsWidget(QWidget, Ui_ALSettingsWidget):
self.setNavigationIcons()
self.ThemeInfoLabel.setTextFormat(Qt.TextFormat.RichText)
self.ThemeInfoLabel.setStyleSheet(
"border: 1px solid palette(mid); border-radius: 4px; padding: 4px;"
"border: 1px solid #ccc; " \
"border-radius: 2px;" \
"padding: 5px;"
)
def setNavigationIcons(
@@ -295,12 +297,12 @@ class ALSettingsWidget(QWidget, Ui_ALSettingsWidget):
):
theme, style, custom_theme = self.collectSettings()
self.__cfg_mgr.set(CfgKey.GLOBAL.APPEARANCE.THEME, theme)
self.__cfg_mgr.set(CfgKey.GLOBAL.APPEARANCE.STYLE, style)
self.__cfg_mgr.set(CfgKey.GLOBAL.APPEARANCE.CUSTOM_THEME, custom_theme)
_applyCustomTheme(custom_theme, theme)
self.syncRadioFromNeedTheme(custom_theme)
theme, _, _ = self.collectSettings()
self.__cfg_mgr.set(CfgKey.GLOBAL.APPEARANCE.THEME, theme)
_applyTheme(theme)
self.setNavigationIcons()
self.updateThemeStatus()