Rewrite #30

Merged
S4NKALP merged 506 commits from dev into macos 2026-07-18 16:11:08 +00:00
2 changed files with 10 additions and 1 deletions
Showing only changes of commit 795e259e16 - Show all commits

No files matched your search

+1
View File
@@ -58,6 +58,7 @@ def main():
panel = Panel()
modusnoti = ModusNoti()
spotlight = SpotlightWindow()
panel.set_spotlight_toggle(spotlight.toggle)
deskwidget = Deskwidgets()
dock = Dock()
osd = OSDWindow()
+9 -1
View File
@@ -75,8 +75,13 @@ class Panel(Window):
spacing=4,
)
self._spotlight_toggle_cb = None
self.search = Button(
name="panel-button", child=svg_file("misc/search.svg", size=22)
name="panel-button",
child=svg_file("misc/search.svg", size=22),
on_clicked=lambda *_: (
self._spotlight_toggle_cb() if self._spotlight_toggle_cb else None
),
)
setup_cursor_hover(self.search, "pointer")
@@ -174,6 +179,9 @@ class Panel(Window):
self._update_tray_visibility()
self.show()
def set_spotlight_toggle(self, callback):
self._spotlight_toggle_cb = callback
def on_dnd_changed(self, _, dnd_state):
self.update_notification_icon() # Update notification icon when DND changes