mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-29 07:52:50 -05:00
use variants for multi display volume popup/toast/notification
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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() {
|
||||||
|
|||||||
24
shell.qml
24
shell.qml
@@ -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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user