✨ feat(ui): refactor Deskwidgets layout for better organization

This commit is contained in:
sankalp committed 2025-08-03 18:51:44 +05:45
1 parent aec1c8bc90
commit 21364fe56c
1 file changed
+38 -30
+38 -30
View File
@@ -450,43 +450,51 @@ class Date(Box):
class Deskwidgets(Window):
config = load_config()
def __init__(self, **kwargs):
config = load_config()
top_left = Window(
anchor="top left",
orientation="h",
layer="bottom",
child=Box(
name="desktop-widgets-container",
children=[
Box(
orientation="v",
name="box-widget",
v_expand=True,
v_align="center",
h_align="center",
children=[Date()],
),
WeatherContainer(),
],
),
)
bottom_left = Window(
anchor="bottom left",
orientation="h",
layer="bottom",
child=Box(),
)
container = Box(
orientation="v",
children=[
top_left,
bottom_left,
],
)
super().__init__(
name="desktop",
layer="bottom",
title="desktop-widgets",
orientation="v",
exclusivity="none",
child=[
Window(
anchor="top left",
orientation="h",
layer="bottom",
child=[
Box(
name="desktop-widgets-container",
children=[
Box(
orientation="v",
name="box-widget",
v_expand=True,
v_align="center",
h_align="center",
children=[Date()],
),
WeatherContainer(),
],
),
],
),
Window(
anchor="bottom left",
orientation="h",
layer="bottom",
child=[],
),
],
child=container,
**kwargs,
)