Replace Rectangle mask with Quickshell.Widgets.ClippingRectangle
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import Quickshell
|
||||
import Quickshell.Widgets
|
||||
import Quickshell.Services.Notifications
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
@@ -14,35 +15,21 @@ Rectangle {
|
||||
radius: 20
|
||||
color: "#181818"
|
||||
|
||||
Image {
|
||||
id: notifIcon
|
||||
visible: false
|
||||
ClippingRectangle {
|
||||
antialiasing: true
|
||||
anchors {
|
||||
verticalCenter: parent.verticalCenter
|
||||
left: parent.left
|
||||
leftMargin: 12
|
||||
}
|
||||
radius: 8
|
||||
width: 40
|
||||
height: 40
|
||||
source: notification?.image ?? source
|
||||
layer.enabled: true
|
||||
}
|
||||
Rectangle {
|
||||
id: iconMask
|
||||
antialiasing: true
|
||||
layer.enabled: true
|
||||
visible: false
|
||||
anchors.fill: notifIcon
|
||||
layer.smooth: true
|
||||
radius: 8
|
||||
}
|
||||
MultiEffect {
|
||||
anchors.fill: notifIcon
|
||||
source: notifIcon
|
||||
maskEnabled: true
|
||||
maskSource: iconMask
|
||||
maskThresholdMin: 0.5
|
||||
maskSpreadAtMin: 1
|
||||
Image {
|
||||
id: notifIcon
|
||||
anchors.fill: parent
|
||||
source: notification?.image ?? source
|
||||
}
|
||||
}
|
||||
Column {
|
||||
id: notifContent
|
||||
|
||||
Reference in New Issue
Block a user