mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-30 16:32:50 -05:00
No DankIcon in notifications
This commit is contained in:
@@ -1184,9 +1184,9 @@ Singleton {
|
|||||||
|
|
||||||
function sendTestNotification(index) {
|
function sendTestNotification(index) {
|
||||||
const notifications = [
|
const notifications = [
|
||||||
["Notification Position Test", "DMS test notification 1 of 3 ~ Hi there!", "dialog-information"],
|
["Notification Position Test", "DMS test notification 1 of 3 ~ Hi there!", "preferences-system"],
|
||||||
["Second Test", "DMS Notification 2 of 3 ~ Check it out!", "emblem-default"],
|
["Second Test", "DMS Notification 2 of 3 ~ Check it out!", "applications-graphics"],
|
||||||
["Third Test", "DMS notification 3 of 3 ~ Enjoy!", "emblem-favorite"]
|
["Third Test", "DMS notification 3 of 3 ~ Enjoy!", "face-smile"]
|
||||||
]
|
]
|
||||||
|
|
||||||
if (index < 0 || index >= notifications.length) {
|
if (index < 0 || index >= notifications.length) {
|
||||||
|
|||||||
@@ -133,10 +133,8 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
hasImage: hasNotificationImage
|
hasImage: hasNotificationImage
|
||||||
fallbackIcon: notificationGroup?.latestNotification?.appIcon || "notifications"
|
fallbackIcon: ""
|
||||||
fallbackText: {
|
fallbackText: {
|
||||||
if (hasNotificationImage || (notificationGroup?.latestNotification?.appIcon && notificationGroup.latestNotification.appIcon !== ""))
|
|
||||||
return ""
|
|
||||||
const appName = notificationGroup?.appName || "?"
|
const appName = notificationGroup?.appName || "?"
|
||||||
return appName.charAt(0).toUpperCase()
|
return appName.charAt(0).toUpperCase()
|
||||||
}
|
}
|
||||||
@@ -390,22 +388,12 @@ Rectangle {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
fallbackIcon: {
|
fallbackIcon: ""
|
||||||
if (modelData?.appIcon && !hasNotificationImage) {
|
|
||||||
const appIcon = modelData.appIcon
|
|
||||||
if (!appIcon.startsWith("file://") && !appIcon.startsWith("http://") && !appIcon.startsWith("https://"))
|
|
||||||
return appIcon
|
|
||||||
}
|
|
||||||
return "notifications"
|
|
||||||
}
|
|
||||||
|
|
||||||
fallbackText: {
|
fallbackText: {
|
||||||
if (!hasNotificationImage && (!modelData?.appIcon || modelData.appIcon === "")) {
|
|
||||||
const appName = modelData?.appName || "?"
|
const appName = modelData?.appName || "?"
|
||||||
return appName.charAt(0).toUpperCase()
|
return appName.charAt(0).toUpperCase()
|
||||||
}
|
}
|
||||||
return ""
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
|||||||
@@ -316,10 +316,8 @@ PanelWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
hasImage: hasNotificationImage
|
hasImage: hasNotificationImage
|
||||||
fallbackIcon: notificationData?.appIcon || "notifications"
|
fallbackIcon: ""
|
||||||
fallbackText: {
|
fallbackText: {
|
||||||
if (hasNotificationImage || (notificationData?.appIcon && notificationData.appIcon !== ""))
|
|
||||||
return ""
|
|
||||||
const appName = notificationData?.appName || "?"
|
const appName = notificationData?.appName || "?"
|
||||||
return appName.charAt(0).toUpperCase()
|
return appName.charAt(0).toUpperCase()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,17 +23,12 @@ Rectangle {
|
|||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: 2
|
anchors.margins: 2
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
fillMode: Image.PreserveAspectCrop
|
fillMode: Image.PreserveAspectFit
|
||||||
smooth: true
|
smooth: true
|
||||||
mipmap: true
|
mipmap: true
|
||||||
cache: true
|
cache: true
|
||||||
visible: false
|
visible: false
|
||||||
source: root.imageSource
|
source: root.imageSource
|
||||||
|
|
||||||
Component.onCompleted: {
|
|
||||||
sourceSize.width = 128
|
|
||||||
sourceSize.height = 128
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MultiEffect {
|
MultiEffect {
|
||||||
@@ -49,9 +44,8 @@ Rectangle {
|
|||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: circularMask
|
id: circularMask
|
||||||
width: parent.width - 4
|
anchors.fill: parent
|
||||||
height: parent.height - 4
|
anchors.margins: 2
|
||||||
anchors.centerIn: parent
|
|
||||||
layer.enabled: true
|
layer.enabled: true
|
||||||
layer.smooth: true
|
layer.smooth: true
|
||||||
visible: false
|
visible: false
|
||||||
|
|||||||
Reference in New Issue
Block a user