feat(modules/panel/components): adjust dropdown capture layer and pointer widget assignments

Changed the default layer used by `create_dropdown_with_capture` from `"bottom"` to `"top"` and updated the call site accordingly. Added safety checks to set `_pointing_widget` on indicator windows when they exist, preventing potential errors when the windows are not created.

- Enhancements:
  - Updated default `layer` parameter in `create_dropdown_with_capture` to `"top"`.
- Bug Fixes:
  - Ensured `BluetoothIndicator`, `NetworkIndicator`, and `BatteryIndicator` properly assign `_pointing_widget` to their respective buttons when the associated windows are present.
This commit is contained in:
sankalp committed 2026-04-10 01:13:29 +05:45
1 parent 38de0c66ed
commit ad6d35fe46
2 files changed
+8 -4

No files matched your search

+2 -4
View File
@@ -34,9 +34,7 @@ def create_menu_button(label, on_clicked=None):
return button
def create_dropdown_with_capture(
dropdown_id, parent, dropdown_children, layer="bottom"
):
def create_dropdown_with_capture(dropdown_id, parent, dropdown_children, layer="top"):
dropdown = ModusDropdown(
dropdown_id=dropdown_id,
parent=parent,
@@ -140,7 +138,7 @@ class GlobalMenuDropdowns:
self.system_dropdown = SystemDropdown(parent=parent)
self.menu_button_dropdown = DropDownMouseCapture(
layer="bottom", child_window=self.system_dropdown
layer="top", child_window=self.system_dropdown
)
self.menu_button = Button(
label="Modus",