Reduced Errors and Warning in console (setting default visisble to false )
This commit is contained in:
1 parent
da03fcd84e
commit
8df2c3401c
6 files changed
+28
-6
No files matched your search
@@ -18,7 +18,7 @@ from modules.switcher import ApplicationSwitcher
|
||||
for log in [
|
||||
"fabric.hyprland.widgets",
|
||||
"fabric.audio.service",
|
||||
"fabric.bluetooth.service",
|
||||
"fabric.bluetooth.service",
|
||||
"services.network",
|
||||
"utils.wayland",
|
||||
"modules.notification.notification",
|
||||
|
||||
+3
-1
@@ -541,8 +541,9 @@ class Dock(Window):
|
||||
|
||||
super().__init__(
|
||||
layer="top",
|
||||
title="modus",
|
||||
title="modus-dock",
|
||||
anchor=anchor,
|
||||
visible=False, # Start hidden until content is ready
|
||||
)
|
||||
if data.DOCK_POSITION == "Left":
|
||||
transition_type = "slide-right"
|
||||
@@ -583,6 +584,7 @@ class Dock(Window):
|
||||
if not data.DOCK_ENABLED:
|
||||
self.set_visible(False)
|
||||
else:
|
||||
# Show dock now that content is ready
|
||||
self.set_visible(True)
|
||||
|
||||
# Set up occlusion checking
|
||||
|
||||
@@ -37,11 +37,12 @@ class Launcher(Window):
|
||||
def __init__(self, **kwargs):
|
||||
super().__init__(
|
||||
name="launcher-window",
|
||||
title="launcher",
|
||||
title="modus-launcher",
|
||||
layer="top",
|
||||
anchor="center",
|
||||
exclusivity="none",
|
||||
keyboard_mode="exclusive",
|
||||
visible=False, # Start hidden until explicitly shown
|
||||
**kwargs,
|
||||
)
|
||||
self._initializing = True
|
||||
|
||||
@@ -882,9 +882,9 @@ class ModusNoti(Window):
|
||||
anchor="top right",
|
||||
child=self.notifications,
|
||||
layer="overlay",
|
||||
title="noti",
|
||||
title="modus-notifications", # More specific title for debugging
|
||||
all_visible=True,
|
||||
visible=True,
|
||||
visible=False, # Start hidden, show only when we have content
|
||||
exclusive=False,
|
||||
)
|
||||
|
||||
@@ -992,6 +992,10 @@ class ModusNoti(Window):
|
||||
pass
|
||||
|
||||
self.notifications.children = [new_box]
|
||||
|
||||
# Show the window now that we have content to display
|
||||
self.set_visible(True)
|
||||
|
||||
new_box.show_all()
|
||||
self.notifications.queue_resize()
|
||||
|
||||
@@ -1029,6 +1033,9 @@ class ModusNoti(Window):
|
||||
self.TRANSITION_DELAY, # Consistent smooth timing
|
||||
lambda: self._show_next_notification() or False,
|
||||
)
|
||||
else:
|
||||
# Hide window when no more notifications to show
|
||||
self.set_visible(False)
|
||||
|
||||
def show_next_notification(self):
|
||||
# Legacy method for compatibility - redirect to new implementation
|
||||
|
||||
@@ -16,10 +16,12 @@ class ApplicationSwitcher(Window):
|
||||
def __init__(self, **kwargs):
|
||||
super().__init__(
|
||||
name="application-switcher",
|
||||
title="modus-switcher",
|
||||
layer="top",
|
||||
anchor="center",
|
||||
exclusivity="auto",
|
||||
keyboard_mode="exclusive",
|
||||
visible=False, # Start hidden until explicitly shown
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
|
||||
+11
-1
@@ -601,8 +601,10 @@ class Deskwidgets(Window):
|
||||
def __init__(self, **kwargs):
|
||||
top_left = Window(
|
||||
anchor="top left",
|
||||
title="modus-widgets-topleft",
|
||||
orientation="h",
|
||||
layer="bottom",
|
||||
visible=False, # Start hidden until content ready
|
||||
child=Box(
|
||||
name="desktop-widgets-container",
|
||||
children=[
|
||||
@@ -615,8 +617,10 @@ class Deskwidgets(Window):
|
||||
|
||||
bottom_left = Window(
|
||||
anchor="bottom right",
|
||||
title="modus-widgets-bottomright",
|
||||
orientation="h",
|
||||
layer="bottom",
|
||||
visible=False, # Start hidden until content ready
|
||||
child=Box(
|
||||
name="desktop-widgets-container",
|
||||
children=[
|
||||
@@ -637,9 +641,15 @@ class Deskwidgets(Window):
|
||||
super().__init__(
|
||||
name="desktop",
|
||||
layer="bottom",
|
||||
title="desktop-widgets",
|
||||
title="modus-desktop-widgets",
|
||||
orientation="v",
|
||||
exclusivity="none",
|
||||
visible=False, # Start hidden until content ready
|
||||
child=container,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
# Show widgets after initialization is complete
|
||||
self.set_visible(True)
|
||||
top_left.set_visible(True)
|
||||
bottom_left.set_visible(True)
|
||||
Reference in new issue
Block a user