MCPcopy Index your code
hub / github.com/T-duality/PillOCR-python / create_menu

Method create_menu

GPTOCRGUI.py:769–778  ·  view source on GitHub ↗

创建托盘菜单

(self)

Source from the content-addressed store, hash-verified

767 threading.Thread(target=self.icon.run, daemon=True).start()
768
769 def create_menu(self):
770 """创建托盘菜单"""
771 return pystray.Menu(
772 pystray.MenuItem(
773 "停止" if self.running_state else "启动", # 使用 self.running_state
774 self.toggle_processing
775 ),
776 pystray.MenuItem("设置", self.show_window),
777 pystray.MenuItem("退出", self.quit_app)
778 )
779
780 def toggle_processing(self, icon=None, item=None):
781 """切换启动/停止状态"""

Callers 5

auto_startMethod · 0.95
start_processingMethod · 0.95
stop_processingMethod · 0.95
create_tray_iconMethod · 0.95
toggle_processingMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected