diff --git a/modules/Bluetooth.qml b/modules/Bluetooth.qml index 6dd46d6..68181dc 100644 --- a/modules/Bluetooth.qml +++ b/modules/Bluetooth.qml @@ -101,10 +101,10 @@ M.BarSection { } } - Loader { + LazyLoader { id: menuLoader active: false - sourceComponent: M.BluetoothMenu { + M.BluetoothMenu { accentColor: root.accentColor screen: root.bar.screen anchorX: root.mapToGlobal(root.width / 2, 0).x - (QsWindow.window?.screen?.x ?? 0) diff --git a/modules/Network.qml b/modules/Network.qml index 01677c5..9c1b7b5 100644 --- a/modules/Network.qml +++ b/modules/Network.qml @@ -121,10 +121,10 @@ M.BarSection { } } - Loader { + LazyLoader { id: menuLoader active: false - sourceComponent: M.NetworkMenu { + M.NetworkMenu { accentColor: root.accentColor screen: root.bar.screen anchorX: root.mapToGlobal(root.width / 2, 0).x - (QsWindow.window?.screen?.x ?? 0) diff --git a/modules/Notifications.qml b/modules/Notifications.qml index 6b7c9ea..c4abc02 100644 --- a/modules/Notifications.qml +++ b/modules/Notifications.qml @@ -77,10 +77,10 @@ M.BarSection { onTapped: M.NotifService.toggleDnd() } - Loader { + LazyLoader { id: centerLoader active: false - sourceComponent: M.NotifCenter { + M.NotifCenter { accentColor: root.accentColor screen: root.bar.screen anchorX: root.mapToGlobal(root.width / 2, 0).x - (QsWindow.window?.screen?.x ?? 0) diff --git a/modules/Power.qml b/modules/Power.qml index 0436874..d94335e 100644 --- a/modules/Power.qml +++ b/modules/Power.qml @@ -23,11 +23,11 @@ M.BarIcon { } } - Loader { + LazyLoader { id: menuLoader active: false - sourceComponent: M.PowerMenu { - accentColor: parent?.accentColor ?? root.color + M.PowerMenu { + accentColor: root.accentColor screen: root.bar.screen anchorX: root.mapToGlobal(root.width / 2, 0).x - (QsWindow.window?.screen?.x ?? 0) onDismissed: menuLoader.active = false diff --git a/modules/Tray.qml b/modules/Tray.qml index b8c35d7..317378d 100644 --- a/modules/Tray.qml +++ b/modules/Tray.qml @@ -105,10 +105,10 @@ RowLayout { } // Per-icon context menu window, created on demand - Loader { + LazyLoader { id: menuLoader active: false - sourceComponent: M.TrayMenu { + M.TrayMenu { accentColor: root.parent?.accentColor ?? M.Theme.base05 handle: iconItem.modelData.menu screen: root.bar.screen