1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 13:32:50 -05:00

No DankIcon in notifications

This commit is contained in:
bbedward
2025-10-08 09:05:33 -04:00
parent 19828d3b06
commit f71dd1ed54
4 changed files with 11 additions and 31 deletions

View File

@@ -1184,9 +1184,9 @@ Singleton {
function sendTestNotification(index) {
const notifications = [
["Notification Position Test", "DMS test notification 1 of 3 ~ Hi there!", "dialog-information"],
["Second Test", "DMS Notification 2 of 3 ~ Check it out!", "emblem-default"],
["Third Test", "DMS notification 3 of 3 ~ Enjoy!", "emblem-favorite"]
["Notification Position Test", "DMS test notification 1 of 3 ~ Hi there!", "preferences-system"],
["Second Test", "DMS Notification 2 of 3 ~ Check it out!", "applications-graphics"],
["Third Test", "DMS notification 3 of 3 ~ Enjoy!", "face-smile"]
]
if (index < 0 || index >= notifications.length) {

View File

@@ -133,10 +133,8 @@ Rectangle {
}
hasImage: hasNotificationImage
fallbackIcon: notificationGroup?.latestNotification?.appIcon || "notifications"
fallbackIcon: ""
fallbackText: {
if (hasNotificationImage || (notificationGroup?.latestNotification?.appIcon && notificationGroup.latestNotification.appIcon !== ""))
return ""
const appName = notificationGroup?.appName || "?"
return appName.charAt(0).toUpperCase()
}
@@ -390,21 +388,11 @@ Rectangle {
return ""
}
fallbackIcon: {
if (modelData?.appIcon && !hasNotificationImage) {
const appIcon = modelData.appIcon
if (!appIcon.startsWith("file://") && !appIcon.startsWith("http://") && !appIcon.startsWith("https://"))
return appIcon
}
return "notifications"
}
fallbackIcon: ""
fallbackText: {
if (!hasNotificationImage && (!modelData?.appIcon || modelData.appIcon === "")) {
const appName = modelData?.appName || "?"
return appName.charAt(0).toUpperCase()
}
return ""
const appName = modelData?.appName || "?"
return appName.charAt(0).toUpperCase()
}
}

View File

@@ -316,10 +316,8 @@ PanelWindow {
}
hasImage: hasNotificationImage
fallbackIcon: notificationData?.appIcon || "notifications"
fallbackIcon: ""
fallbackText: {
if (hasNotificationImage || (notificationData?.appIcon && notificationData.appIcon !== ""))
return ""
const appName = notificationData?.appName || "?"
return appName.charAt(0).toUpperCase()
}

View File

@@ -23,17 +23,12 @@ Rectangle {
anchors.fill: parent
anchors.margins: 2
asynchronous: true
fillMode: Image.PreserveAspectCrop
fillMode: Image.PreserveAspectFit
smooth: true
mipmap: true
cache: true
visible: false
source: root.imageSource
Component.onCompleted: {
sourceSize.width = 128
sourceSize.height = 128
}
}
MultiEffect {
@@ -49,9 +44,8 @@ Rectangle {
Item {
id: circularMask
width: parent.width - 4
height: parent.height - 4
anchors.centerIn: parent
anchors.fill: parent
anchors.margins: 2
layer.enabled: true
layer.smooth: true
visible: false