refactor: replace Loader with LazyLoader for all popup menus

This commit is contained in:
Damocles 2026-04-13 20:21:18 +02:00
parent c5067c4e7f
commit 1dea93e1bd
5 changed files with 11 additions and 11 deletions

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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

View file

@ -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