From b70a4427e0baf2950621830832851adf93481e2c Mon Sep 17 00:00:00 2001 From: Slava Monich Date: Sun, 10 Jan 2021 04:25:02 +0200 Subject: [PATCH] Apply press effect to profile thumbnail in chat list --- qml/components/ChatListViewItem.qml | 1 + qml/components/ProfileThumbnail.qml | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/qml/components/ChatListViewItem.qml b/qml/components/ChatListViewItem.qml index 30f2435..684f02a 100644 --- a/qml/components/ChatListViewItem.qml +++ b/qml/components/ChatListViewItem.qml @@ -9,6 +9,7 @@ PhotoTextsListItem { id: listItem pictureThumbnail { photoData: photo_small || ({}) + highlighted: listItem.highlighted && !listItem.menuOpen } property int ownUserId property bool showDraft: !!draft_message_text && draft_message_date > last_message_date diff --git a/qml/components/ProfileThumbnail.qml b/qml/components/ProfileThumbnail.qml index 04f7cf9..555cc1c 100644 --- a/qml/components/ProfileThumbnail.qml +++ b/qml/components/ProfileThumbnail.qml @@ -22,7 +22,6 @@ import Sailfish.Silica 1.0 import WerkWolf.Fernschreiber 1.0 Item { - id: profileThumbnail property alias photoData: file.fileInformation @@ -30,6 +29,10 @@ Item { property int radius: width / 2 property int imageStatus: -1 property bool optimizeImageSize: true + property bool highlighted + + layer.enabled: highlighted + layer.effect: PressEffect { source: profileThumbnail } function getReplacementString() { if (replacementStringHint.length > 2) {