mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 21:42:51 -05:00
use variants for multi display volume popup/toast/notification
This commit is contained in:
@@ -5,6 +5,9 @@ import qs.Services
|
||||
|
||||
QtObject {
|
||||
id: manager
|
||||
|
||||
property var modelData
|
||||
|
||||
property int topMargin: 0
|
||||
property int baseNotificationHeight: 120
|
||||
property int maxTargetNotifications: 3
|
||||
@@ -84,7 +87,8 @@ QtObject {
|
||||
const win = popupComponent.createObject(null, {
|
||||
notificationData: wrapper,
|
||||
notificationId: notificationId,
|
||||
screenY: topMargin
|
||||
screenY: topMargin,
|
||||
screen: manager.modelData
|
||||
});
|
||||
|
||||
if (!win) {
|
||||
|
||||
@@ -9,7 +9,10 @@ import qs.Widgets
|
||||
|
||||
PanelWindow {
|
||||
id: root
|
||||
|
||||
|
||||
property var modelData
|
||||
screen: modelData
|
||||
|
||||
visible: ToastService.toastVisible
|
||||
WlrLayershell.layer: WlrLayershell.Overlay
|
||||
WlrLayershell.exclusiveZone: -1
|
||||
|
||||
@@ -9,7 +9,10 @@ import qs.Widgets
|
||||
|
||||
PanelWindow {
|
||||
id: root
|
||||
|
||||
|
||||
property var modelData
|
||||
screen: modelData
|
||||
|
||||
property bool volumePopupVisible: false
|
||||
|
||||
function show() {
|
||||
|
||||
24
shell.qml
24
shell.qml
@@ -50,8 +50,12 @@ ShellRoot {
|
||||
id: notificationCenter
|
||||
}
|
||||
|
||||
NotificationPopupManager {
|
||||
id: notificationPopupManager
|
||||
Variants {
|
||||
model: Quickshell.screens
|
||||
|
||||
delegate: NotificationPopupManager {
|
||||
modelData: item
|
||||
}
|
||||
}
|
||||
|
||||
ControlCenterPopout {
|
||||
@@ -143,11 +147,19 @@ ShellRoot {
|
||||
target: "processlist"
|
||||
}
|
||||
|
||||
Toast {
|
||||
id: toastWidget
|
||||
Variants {
|
||||
model: Quickshell.screens
|
||||
|
||||
delegate: Toast {
|
||||
modelData: item
|
||||
}
|
||||
}
|
||||
|
||||
VolumePopup {
|
||||
id: volumePopup
|
||||
Variants {
|
||||
model: Quickshell.screens
|
||||
|
||||
delegate: VolumePopup {
|
||||
modelData: item
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user