fixed a lot of quickshell problems

This commit is contained in:
Tomas Rivera
2026-03-10 18:38:32 +01:00
parent b9e3f35abe
commit 25dc8507b8
16 changed files with 145 additions and 32 deletions
+19 -2
View File
@@ -45,7 +45,7 @@ Item {
anchors.left: parent.left
anchors.right: parent.right
Text {
/*Text { // we sanitize in case there is some null notification
Layout.maximumWidth: bannerRect.width
text: root.notif.summary + (root.notif.body ? "\n=======" : "")
font.family: "BigBlueTermPlusNerdFont"
@@ -63,7 +63,24 @@ Item {
font.pointSize: 14
font.bold: false
color: "#9292B6"
}
}*/
Text {
text: root.notif ? root.notif.summary + (root.notif.body ? "\n" : "") : ""
font.family: "BigBlueTermPlusNerdFont"
wrapMode: Text.Wrap
font.pointSize: 18
font.bold: true
color: "#9292B6"
}
Text {
text: root.notif ? root.notif.body : ""
font.family: "BigBlueTermPlusNerdFont"
wrapMode: Text.Wrap
font.pointSize: 14
font.bold: false
color: "#9292B6"
}
}
}
}
+4 -2
View File
@@ -117,7 +117,8 @@ Item {
visible: false
Process {
id: screamCmd
command: ["play", "--no-show-progress", "assets/wilhelm-scream.ogg"]
command: ["mplayer", "../assets/wilhelm-scream.ogg"]
//command: ["play", "--no-show-progress", "assets/wilhelm-scream.ogg"]
}
onVisibleChanged: () => {
if (visible) {
@@ -177,7 +178,8 @@ Item {
Process {
id: playSoundCmd
command: ["play", "--no-show-progress", "assets/trumpet.wav"]
command: ["mplayer", "../assets/trumpet.wav"]
//command: ["play", "--no-show-progress", "assets/trumpet.wav"]
}
Component.onCompleted: playSoundCmd.startDetached()
}
+10 -3
View File
@@ -28,10 +28,15 @@ PanelWindow {
onNotification: notif => {
notif.tracked = true;
root.notifs = [...root.notifs, notif];
}
//root.notifs = [...root.notifs, notif]; // sometimes sent as null
if (notif) {
notif.tracked = true;
root.notifs = [...root.notifs, notif];
}
}
}
visible: stack.children.length != 0
mask: Region {
item: stack
@@ -79,11 +84,13 @@ PanelWindow {
notif: modelData
onDismissed: () => {
if (notif) { //handles sometimes WARN scene: @notifs/Overlay.qml[82:-1]: TypeError: Cannot read property 'dismiss' of null
modelData.dismiss();
// Remove from list
const index = root.notifs.indexOf(notif);
if (index > -1)
root.notifs.splice(index, 1);
root.notifs.splice(index, 1);
}
}
}
}