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.
This commit is contained in:
LemonNexus 2026-02-14 19:49:03 +00:00
parent e62419a9fd
commit 539f07e713
1 changed files with 2 additions and 2 deletions

View File

@ -528,7 +528,7 @@ class OverlayWindow(QMainWindow):
# Ctrl+1-9 to switch plugins # Ctrl+1-9 to switch plugins
for i in range(1, 10): for i in range(1, 10):
shortcut = QShortcut(QKeySequence(f"Ctrl+{i}"), self) 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): def _setup_animations(self):
"""Setup window animations.""" """Setup window animations."""
@ -559,7 +559,7 @@ class OverlayWindow(QMainWindow):
# Create sidebar button # Create sidebar button
btn = SidebarButton(plugin.name, icon_name, self.icon_manager) 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 # Insert before stretch
self.sidebar_buttons_layout.insertWidget(idx, btn) self.sidebar_buttons_layout.insertWidget(idx, btn)