diff --git a/app/ui/config_dialog.py b/app/ui/config_dialog.py index 9d1db39..a141b65 100644 --- a/app/ui/config_dialog.py +++ b/app/ui/config_dialog.py @@ -12,12 +12,8 @@ from .user_settings import load_user_settings, save_user_settings from .ui_widgets import center_window from app.core.utils.dialog_utils import show_cloud_sync_dialog -# 模块级状态 -_PROCESSOR_SERVICE = None - def show_config_dialog(root, cfg: ConfigManager): - global _PROCESSOR_SERVICE settings = load_user_settings() dlg = tk.Toplevel(root) @@ -204,18 +200,6 @@ def show_config_dialog(root, cfg: ConfigManager): except Exception as e: messagebox.showerror("保存失败", str(e)) - def reload_suppliers(): - global _PROCESSOR_SERVICE - try: - from app.services.processor_service import ProcessorService - if _PROCESSOR_SERVICE is None: - _PROCESSOR_SERVICE = ProcessorService(ConfigManager()) - _PROCESSOR_SERVICE.reload_processors() - messagebox.showinfo("已重新加载", "供应商处理器已重新加载并应用最新配置") - except Exception as e: - messagebox.showerror("重新加载失败", str(e)) - - ttk.Button(btns, text="重新加载供应商配置", command=reload_suppliers).pack(side=tk.LEFT) - ttk.Button(btns, text="云端同步", command=lambda: show_cloud_sync_dialog(dlg)).pack(side=tk.LEFT, padx=6) + ttk.Button(btns, text="云端同步", command=lambda: show_cloud_sync_dialog(dlg)).pack(side=tk.LEFT) ttk.Button(btns, text="取消", command=dlg.destroy).pack(side=tk.RIGHT) ttk.Button(btns, text="保存", command=save_settings).pack(side=tk.RIGHT, padx=6) diff --git a/app/ui/main_window.py b/app/ui/main_window.py index 05162ce..0114869 100644 --- a/app/ui/main_window.py +++ b/app/ui/main_window.py @@ -145,7 +145,7 @@ def _create_recent_files_section(parent, theme, log_text): def _resize_recent_top(e): try: - h = max(int(e.height * 0.85), 300) + h = max(int(e.height * 0.85), 180) recent_top.configure(height=h) except Exception: pass