Compare commits
No commits in common. "41b75cffca3ce6e2417332c4753ab47c70bce339" and "6e6135c53bb3a5c6e3a6f94d5b0401ded42ac0e9" have entirely different histories.
41b75cffca
...
6e6135c53b
3 changed files with 30 additions and 49 deletions
|
|
@ -1,40 +0,0 @@
|
||||||
pragma ComponentBehavior: Bound
|
|
||||||
|
|
||||||
import qs.widgets
|
|
||||||
import QtQuick
|
|
||||||
import QtQuick.Layouts
|
|
||||||
import Quickshell
|
|
||||||
import Quickshell.Widgets
|
|
||||||
|
|
||||||
StyledLabel {
|
|
||||||
id: root
|
|
||||||
|
|
||||||
required property var modelData
|
|
||||||
|
|
||||||
margin: 16
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
ClippingRectangle {
|
|
||||||
implicitWidth: icon.implicitSize
|
|
||||||
implicitHeight: icon.implicitSize
|
|
||||||
IconImage {
|
|
||||||
id: icon
|
|
||||||
implicitSize: 20
|
|
||||||
source: root.modelData.image == "" ? Quickshell.iconPath(root.modelData.appIcon, "device-support-unknown-symbolic") : root.modelData.image
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ColumnLayout {
|
|
||||||
|
|
||||||
StyledText {
|
|
||||||
font.bold: true
|
|
||||||
font.pixelSize: 12
|
|
||||||
text: root.modelData.summary ?? root.modelData.appName
|
|
||||||
}
|
|
||||||
StyledText {
|
|
||||||
text: root.modelData.body
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -61,7 +61,34 @@ StyledPopupWindow {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
model: Notifications.list
|
model: Notifications.list
|
||||||
delegate: NotificationItem {}
|
delegate: StyledLabel {
|
||||||
|
required property var modelData
|
||||||
|
margin: 16
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
RowLayout {
|
||||||
|
ClippingRectangle {
|
||||||
|
implicitWidth: icon.implicitSize
|
||||||
|
implicitHeight: icon.implicitSize
|
||||||
|
IconImage {
|
||||||
|
id: icon
|
||||||
|
implicitSize: 20
|
||||||
|
source: modelData.image == "" ? Quickshell.iconPath(modelData.appIcon, "device-support-unknown-symbolic") : modelData.image
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ColumnLayout {
|
||||||
|
|
||||||
|
StyledText {
|
||||||
|
font.bold: true
|
||||||
|
font.pixelSize: 12
|
||||||
|
text: modelData.summary ?? modelData.appName
|
||||||
|
}
|
||||||
|
StyledText {
|
||||||
|
text: modelData.body
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
pragma Singleton
|
pragma Singleton
|
||||||
|
|
||||||
import QtQuick
|
|
||||||
import Quickshell
|
import Quickshell
|
||||||
import Quickshell.Services.Notifications
|
import Quickshell.Services.Notifications
|
||||||
|
|
||||||
|
|
@ -32,14 +31,9 @@ Singleton {
|
||||||
if (!root.enabled) {
|
if (!root.enabled) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event == null) {
|
|
||||||
console.log("Event is null?");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
event.tracked = true;
|
event.tracked = true;
|
||||||
root.list = root.list.filter(item => item != null && item.id != event.id).push(event);
|
root.list = root.list.filter(item => item.id != event.id);
|
||||||
|
root.list.push(event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue