1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-29 16:02:51 -05:00

use variants for multi display volume popup/toast/notification

This commit is contained in:
bbedward
2025-07-26 16:24:35 -04:00
parent 01a94a17de
commit 1472f00f4b
4 changed files with 31 additions and 9 deletions

View File

@@ -5,6 +5,9 @@ import qs.Services
QtObject { QtObject {
id: manager id: manager
property var modelData
property int topMargin: 0 property int topMargin: 0
property int baseNotificationHeight: 120 property int baseNotificationHeight: 120
property int maxTargetNotifications: 3 property int maxTargetNotifications: 3
@@ -84,7 +87,8 @@ QtObject {
const win = popupComponent.createObject(null, { const win = popupComponent.createObject(null, {
notificationData: wrapper, notificationData: wrapper,
notificationId: notificationId, notificationId: notificationId,
screenY: topMargin screenY: topMargin,
screen: manager.modelData
}); });
if (!win) { if (!win) {

View File

@@ -9,7 +9,10 @@ import qs.Widgets
PanelWindow { PanelWindow {
id: root id: root
property var modelData
screen: modelData
visible: ToastService.toastVisible visible: ToastService.toastVisible
WlrLayershell.layer: WlrLayershell.Overlay WlrLayershell.layer: WlrLayershell.Overlay
WlrLayershell.exclusiveZone: -1 WlrLayershell.exclusiveZone: -1

View File

@@ -9,7 +9,10 @@ import qs.Widgets
PanelWindow { PanelWindow {
id: root id: root
property var modelData
screen: modelData
property bool volumePopupVisible: false property bool volumePopupVisible: false
function show() { function show() {

View File

@@ -50,8 +50,12 @@ ShellRoot {
id: notificationCenter id: notificationCenter
} }
NotificationPopupManager { Variants {
id: notificationPopupManager model: Quickshell.screens
delegate: NotificationPopupManager {
modelData: item
}
} }
ControlCenterPopout { ControlCenterPopout {
@@ -143,11 +147,19 @@ ShellRoot {
target: "processlist" target: "processlist"
} }
Toast { Variants {
id: toastWidget model: Quickshell.screens
delegate: Toast {
modelData: item
}
} }
VolumePopup { Variants {
id: volumePopup model: Quickshell.screens
delegate: VolumePopup {
modelData: item
}
} }
} }