1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-07 14:05:38 -05:00

Updated image & theme logic and added proper close buttons to the notifications

This commit is contained in:
purian23
2025-07-13 00:58:52 -04:00
parent aeef300ef0
commit 75b9c4e224
2 changed files with 117 additions and 77 deletions

View File

@@ -76,14 +76,14 @@ PanelWindow {
anchors.right: parent.right
anchors.top: parent.top
anchors.margins: 8
color: closeButtonArea.containsMouse ? Qt.rgba(Theme.error.r, Theme.error.g, Theme.error.b, 0.12) : "transparent"
color: closeButtonArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : "transparent"
Text {
anchors.centerIn: parent
text: "close"
font.family: Theme.iconFont
font.pixelSize: 16
color: closeButtonArea.containsMouse ? Theme.error : Theme.surfaceText
color: closeButtonArea.containsMouse ? Theme.primary : Theme.surfaceText
}
MouseArea {
@@ -163,7 +163,6 @@ PanelWindow {
Image {
id: notifImage
anchors.fill: parent
readonly property int size: parent.width
source: root.activeNotification ? root.activeNotification.image : ""
fillMode: Image.PreserveAspectCrop
@@ -172,19 +171,17 @@ PanelWindow {
asynchronous: true
smooth: true
// Proper sizing like EXAMPLE
width: size
height: size
sourceSize.width: size
sourceSize.height: size
// Use the parent size for optimization
sourceSize.width: parent.width
sourceSize.height: parent.height
layer.enabled: true
layer.effect: MultiEffect {
maskEnabled: true
maskSource: Rectangle {
width: notifImage.size
height: notifImage.size
radius: notifImage.size / 2 // Fully rounded
width: 48
height: 48
radius: 24 // Fully rounded
}
}