feat: father I am sorry for I have sinned

Shitty workaround for "dynamic" clickable areas
This commit is contained in:
Nydragon 2024-10-02 18:40:50 +02:00
parent 5309cf0de6
commit 05c0df3478
Signed by: nydragon
SSH key fingerprint: SHA256:iQnIC12spf4QjWSbarmkD2No1cLMlu6TWoV7K6cYF5g
2 changed files with 35 additions and 2 deletions

View file

@ -12,13 +12,44 @@ PopupWindow {
window: popups.win window: popups.win
} }
mask: Region { mask: Region {
id: mask
item: popupcol item: popupcol
intersection: Intersection.Xor intersection: Intersection.Xor
Region {
item: popupcol.children[0]
intersection: Intersection.Xor
}
Region {
item: popupcol.children[1]
intersection: Intersection.Xor
}
Region {
item: popupcol.children[2]
intersection: Intersection.Xor
}
Region {
item: popupcol.children[3]
intersection: Intersection.Xor
}
Region {
item: popupcol.children[4]
intersection: Intersection.Xor
}
Region {
item: popupcol.children[5]
intersection: Intersection.Xor
}
} }
visible: true visible: true
color: "transparent" color: "transparent"
height: 500 height: 500
width: 400 width: 300
ListView { ListView {
id: popupcol id: popupcol
anchors.margins: lbar.width * 0.2 anchors.margins: lbar.width * 0.2

View file

@ -14,6 +14,7 @@ MouseArea {
required property string summary required property string summary
required property string body required property string body
required property string appIcon required property string appIcon
required property string image
required property NotificationUrgency urgency required property NotificationUrgency urgency
required property int index required property int index
@ -36,10 +37,11 @@ MouseArea {
IconImage { IconImage {
source: Quickshell.iconPath(toast.appIcon) source: Quickshell.iconPath(toast.appIcon)
height: 16 height: 16
visible: toast.appIcon
} }
Text { Text {
text: toast.appName + ": " + toast.summary text: (toast.appIcon ? " " : toast.appName + ": ") + toast.summary
} }
} }
Text { Text {