Compare commits
4 commits
fc930af43c
...
d6b1a7ae58
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d6b1a7ae58 | ||
|
|
b31fab5148 | ||
|
|
dd88b8a4c2 | ||
|
|
af3afa6a14 |
4 changed files with 10 additions and 5 deletions
|
|
@ -81,6 +81,7 @@
|
|||
rust-analyzer
|
||||
clippy
|
||||
rustfmt
|
||||
libnotify
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -271,7 +271,7 @@ M.HoverPanel {
|
|||
const ic = notifDelegate.modelData.appIcon;
|
||||
if (!ic)
|
||||
return "";
|
||||
return ic.startsWith("/") ? ic : Quickshell.iconPath(ic, "dialog-information");
|
||||
return (ic.startsWith("/") || ic.startsWith("file://")) ? ic : Quickshell.iconPath(ic, "dialog-information");
|
||||
}
|
||||
visible: status === Image.Ready
|
||||
fillMode: Image.PreserveAspectFit
|
||||
|
|
@ -382,7 +382,7 @@ M.HoverPanel {
|
|||
const ic = notifDelegate._notif?.appIcon;
|
||||
if (!ic)
|
||||
return "";
|
||||
return ic.startsWith("/") ? ic : Quickshell.iconPath(ic, "dialog-information");
|
||||
return (ic.startsWith("/") || ic.startsWith("file://")) ? ic : Quickshell.iconPath(ic, "dialog-information");
|
||||
}
|
||||
visible: status === Image.Ready
|
||||
fillMode: Image.PreserveAspectFit
|
||||
|
|
@ -437,7 +437,7 @@ M.HoverPanel {
|
|||
// Actions
|
||||
Row {
|
||||
spacing: 4
|
||||
visible: notifDelegate._notif?.actions && notifDelegate._notif.actions.length > 0
|
||||
visible: !!(notifDelegate._notif?.actions?.length)
|
||||
|
||||
Repeater {
|
||||
model: notifDelegate._notif?.actions ?? []
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ PanelWindow {
|
|||
const ic = popupItem.modelData.appIcon;
|
||||
if (!ic)
|
||||
return "";
|
||||
return ic.startsWith("/") ? ic : Quickshell.iconPath(ic, "dialog-information");
|
||||
return (ic.startsWith("/") || ic.startsWith("file://")) ? ic : Quickshell.iconPath(ic, "dialog-information");
|
||||
}
|
||||
visible: status === Image.Ready
|
||||
fillMode: Image.PreserveAspectFit
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Services.Notifications
|
||||
import "." as M
|
||||
|
||||
M.BarSection {
|
||||
|
|
@ -14,6 +15,8 @@ M.BarSection {
|
|||
|
||||
required property var bar
|
||||
|
||||
readonly property bool hasUrgent: M.NotifService.list.some(n => n.urgency === NotificationUrgency.Critical && n.state !== "dismissed")
|
||||
|
||||
M.BarIcon {
|
||||
icon: {
|
||||
if (M.NotifService.dnd)
|
||||
|
|
@ -25,7 +28,8 @@ M.BarSection {
|
|||
}
|
||||
M.BarLabel {
|
||||
id: countLabel
|
||||
label: M.NotifService.count > 0 ? String(M.NotifService.count) : ""
|
||||
label: M.NotifService.count > 0 ? String(M.NotifService.count) + (root.hasUrgent ? "!" : "") : ""
|
||||
color: root.hasUrgent ? M.Theme.base08 : root.accentColor
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
transform: Scale {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue