✨ feat(dashboard): make Bluetooth and Network tiles toggleable via content area click
This commit is contained in:
3 files changed
+45
-1
No files matched your search
@@ -85,7 +85,7 @@ class Tile(Box):
|
||||
)
|
||||
|
||||
# Container for label and properties
|
||||
self.type_box = Box(
|
||||
content_box = Box(
|
||||
style_classes="tile-type",
|
||||
orientation="v",
|
||||
v_expand=True,
|
||||
@@ -94,6 +94,17 @@ class Tile(Box):
|
||||
children=[self.tile_label, self.props],
|
||||
)
|
||||
|
||||
# Make the type_box clickable using a button
|
||||
self.type_box = Button(
|
||||
style_classes="tile-content-button",
|
||||
h_expand=True,
|
||||
v_expand=True,
|
||||
child=content_box,
|
||||
on_clicked=self.handle_click,
|
||||
)
|
||||
# Add hover cursor to the content area
|
||||
add_hover_cursor(self.type_box)
|
||||
|
||||
def _create_tile_layout(self, has_menu: bool):
|
||||
"""Create the tile's layout structure."""
|
||||
# Create menu button if needed
|
||||
|
||||
Reference in new issue
Block a user