✨ 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 c4f36bf0ee
commit 597abdfd59
1 file changed
+24 -16
+24 -16
View File
@@ -450,21 +450,14 @@ class Date(Box):
class Deskwidgets(Window): class Deskwidgets(Window):
def __init__(self, **kwargs):
config = load_config() config = load_config()
super().__init__(
name="desktop", def __init__(self, **kwargs):
layer="bottom", top_left = Window(
title="desktop-widgets",
orientation="v",
exclusivity="none",
child=[
Window(
anchor="top left", anchor="top left",
orientation="h", orientation="h",
layer="bottom", layer="bottom",
child=[ child=Box(
Box(
name="desktop-widgets-container", name="desktop-widgets-container",
children=[ children=[
Box( Box(
@@ -478,15 +471,30 @@ class Deskwidgets(Window):
WeatherContainer(), WeatherContainer(),
], ],
), ),
], )
),
Window( bottom_left = Window(
anchor="bottom left", anchor="bottom left",
orientation="h", orientation="h",
layer="bottom", layer="bottom",
child=[], 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=container,
**kwargs, **kwargs,
) )