fix(HDMI-Tool): 下拉菜单配色统一为深色主题

This commit is contained in:
2026-09-12 02:36:46 +08:00
parent 68c7909922
commit 90433064ec
2 changed files with 9 additions and 0 deletions
Binary file not shown.
+9
View File
@@ -45,9 +45,18 @@ def get_icon_path():
return p if os.path.exists(p) else None
def _apply_dropdown_theme():
"""CTk 默认下拉菜单是白底, 在深色界面里风格突兀; 改为随外观自适应的配色。
在创建任何控件前调用, 对全部 CTkComboBox/菜单生效。"""
ctk.ThemeManager.theme['DropdownMenu']['fg_color'] = ('#F2F2F2', '#2B2B2B')
ctk.ThemeManager.theme['DropdownMenu']['hover_color'] = ('#D8D8D8', '#3C3C3C')
ctk.ThemeManager.theme['DropdownMenu']['text_color'] = ('#1A1A1A', '#DADADA')
def run_gui(auto_close=0):
"""入口: 配置外观并启动主窗口"""
ctk.set_appearance_mode('Dark')
_apply_dropdown_theme()
App(auto_close).mainloop()