From 539f07e713ee27b786fa6f88b3d3eeb728d8b044 Mon Sep 17 00:00:00 2001 From: LemonNexus Date: Sat, 14 Feb 2026 19:49:03 +0000 Subject: [PATCH] fix: Fix lambda function argument errors in overlay_window.py BUG: TypeError: missing 1 required positional argument: 'checked' The lambda functions were expecting a 'checked' argument that wasn't being passed by the signals: - QShortcut.activated doesn't pass any arguments - SidebarButton.clicked doesn't pass any arguments Fix: Removed 'checked' parameter from both lambda functions. --- core/overlay_window.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/overlay_window.py b/core/overlay_window.py index 8d19648..97c182f 100644 --- a/core/overlay_window.py +++ b/core/overlay_window.py @@ -528,7 +528,7 @@ class OverlayWindow(QMainWindow): # Ctrl+1-9 to switch plugins for i in range(1, 10): shortcut = QShortcut(QKeySequence(f"Ctrl+{i}"), self) - shortcut.activated.connect(lambda checked, idx=i-1: self._switch_to_plugin(idx)) + shortcut.activated.connect(lambda idx=i-1: self._switch_to_plugin(idx)) def _setup_animations(self): """Setup window animations.""" @@ -559,7 +559,7 @@ class OverlayWindow(QMainWindow): # Create sidebar button btn = SidebarButton(plugin.name, icon_name, self.icon_manager) - btn.clicked.connect(lambda checked, i=idx: self._on_plugin_selected(i)) + btn.clicked.connect(lambda i=idx: self._on_plugin_selected(i)) # Insert before stretch self.sidebar_buttons_layout.insertWidget(idx, btn)