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:
2 files changed
+8
-4
No files matched your search
@@ -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",
|
||||
|
||||
Reference in new issue
Block a user