✨ feat(ui): refactor Deskwidgets layout for better organization
This commit is contained in:
1 parent
c4f36bf0ee
commit
597abdfd59
1 file changed
+38
-30
+38
-30
@@ -450,43 +450,51 @@ class Date(Box):
|
|||||||
|
|
||||||
|
|
||||||
class Deskwidgets(Window):
|
class Deskwidgets(Window):
|
||||||
|
config = load_config()
|
||||||
|
|
||||||
def __init__(self, **kwargs):
|
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__(
|
super().__init__(
|
||||||
name="desktop",
|
name="desktop",
|
||||||
layer="bottom",
|
layer="bottom",
|
||||||
title="desktop-widgets",
|
title="desktop-widgets",
|
||||||
orientation="v",
|
orientation="v",
|
||||||
exclusivity="none",
|
exclusivity="none",
|
||||||
child=[
|
child=container,
|
||||||
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=[],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
**kwargs,
|
**kwargs,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user