1
1
mirror of https://github.com/KenanZhu/AutoLibrary.git synced 2026-08-02 06:09:36 +08:00

feat(gui): 新增主题信息标签,移除 custom_qss 兼容,优化重置按钮

- .ui 新增 ThemeInfoLabel 用于展示主题作者和简介
- ALSettingsWidget 新增 _updateThemeInfo 方法,ComboBox 切换时更新信息
- 移除 _loadQss/_applyQss 模块函数及所有 CUSTOM_QSS 引用
- AppInitializer 移除 _applyQss 导入和回退逻辑
- ConfigProvider/ConfigManager 移除 custom_qss 键
- 纯 QSS 导入通过 ThemeManager 打包为 .altheme 统一管理
This commit is contained in:
2026-05-30 21:33:59 +08:00
parent c1004ed2bc
commit a2bc1881bc
5 changed files with 55 additions and 43 deletions
+1 -5
View File
@@ -15,7 +15,6 @@ from PySide6.QtWidgets import QApplication
from gui.ALSettingsWidget import (
_setActiveStyleName,
_applyTheme,
_applyQss,
)
from interfaces.ConfigProvider import CfgKey
from managers.config.ConfigManager import instance as configInstance
@@ -80,7 +79,6 @@ def _initializeAppearance(
cfg = configInstance()
saved_style = cfg.get(CfgKey.GLOBAL.APPEARANCE.STYLE, "Fusion")
saved_theme = cfg.get(CfgKey.GLOBAL.APPEARANCE.THEME, "system")
saved_qss = cfg.get(CfgKey.GLOBAL.APPEARANCE.CUSTOM_QSS, "")
saved_custom_theme = cfg.get(CfgKey.GLOBAL.APPEARANCE.CUSTOM_THEME, "")
app.setStyle(saved_style)
_setActiveStyleName(saved_style)
@@ -89,9 +87,7 @@ def _initializeAppearance(
from managers.theme.ThemeManager import instance as themeInstance
themeInstance().applyTheme(saved_custom_theme)
except Exception:
_applyQss(saved_qss)
else:
_applyQss(saved_qss)
pass
_applyTheme(saved_theme)
def initializeApp(