Fixed Parent error thing

This commit is contained in:
tr1x_em committed 2025-08-07 11:21:36 +05:30
1 parent 8df2c3401c
commit 65dae19fee
1 file changed
+16 -24
+16 -24
View File
@@ -599,7 +599,19 @@ class Deskwidgets(Window):
config = load_config() config = load_config()
def __init__(self, **kwargs): def __init__(self, **kwargs):
top_left = Window( # Create the main invisible window that manages the widgets
super().__init__(
name="desktop-widget-manager",
layer="bottom",
title="modus-desktop-widget-manager",
visible=False, # This window is invisible - just manages the others
size=(1, 1), # Minimal size
anchor="top left",
**kwargs,
)
# Create separate independent windows as attributes
self.top_left = Window(
anchor="top left", anchor="top left",
title="modus-widgets-topleft", title="modus-widgets-topleft",
orientation="h", orientation="h",
@@ -615,7 +627,7 @@ class Deskwidgets(Window):
), ),
) )
bottom_left = Window( self.bottom_left = Window(
anchor="bottom right", anchor="bottom right",
title="modus-widgets-bottomright", title="modus-widgets-bottomright",
orientation="h", orientation="h",
@@ -630,26 +642,6 @@ class Deskwidgets(Window):
), ),
) )
container = Box(
orientation="v",
children=[
top_left,
bottom_left,
],
)
super().__init__(
name="desktop",
layer="bottom",
title="modus-desktop-widgets",
orientation="v",
exclusivity="none",
visible=False, # Start hidden until content ready
child=container,
**kwargs,
)
# Show widgets after initialization is complete # Show widgets after initialization is complete
self.set_visible(True) self.top_left.set_visible(True)
top_left.set_visible(True) self.bottom_left.set_visible(True)
bottom_left.set_visible(True)