Simplify Ripple effect and make it easier to use everywhere

This commit is contained in:
Nicolas Werner 2022-01-02 06:22:27 +01:00
parent 87ba5796bc
commit 1c83ce1e79
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
6 changed files with 106 additions and 163 deletions

View file

@ -47,17 +47,6 @@ Rectangle {
anchors.fill: parent
visible: Settings.useIdenticon && img.status != Image.Ready
source: Settings.useIdenticon ? ("image://jdenticon/" + (userid !== "" ? userid : roomid) + "?radius=" + (Settings.avatarCircles ? 100 : 25)) : ""
MouseArea {
anchors.fill: parent
Ripple {
rippleTarget: parent
color: Qt.rgba(Nheko.colors.alternateBase.r, Nheko.colors.alternateBase.g, Nheko.colors.alternateBase.b, 0.5)
}
}
}
Image {
@ -118,4 +107,8 @@ Rectangle {
onSingleTapped: avatar.clicked(eventPoint)
}
Ripple {
color: Qt.rgba(Nheko.colors.alternateBase.r, Nheko.colors.alternateBase.g, Nheko.colors.alternateBase.b, 0.5)
}
}