diff --git a/src/qml/FeedListDelegate.qml b/src/qml/FeedListDelegate.qml index e8505a7e..4f713b82 100644 --- a/src/qml/FeedListDelegate.qml +++ b/src/qml/FeedListDelegate.qml @@ -31,19 +31,6 @@ Item { height: cardSize - cardMargin width: cardSize - cardMargin - //layer.enabled: true - layer.effect: OpacityMask { - maskSource: Item { - width: img.width - height: img.height - Rectangle { - anchors.centerIn: parent - width: img.adapt ? img.width : Math.min(img.width, img.height) - height: img.adapt ? img.height : width - radius: Math.min(width, height)/5 - } - } - } MouseArea { anchors.fill: parent onClicked: { diff --git a/src/qml/GenericEntryDelegate.qml b/src/qml/GenericEntryDelegate.qml index 65dd9d88..2ddae4e7 100644 --- a/src/qml/GenericEntryDelegate.qml +++ b/src/qml/GenericEntryDelegate.qml @@ -10,6 +10,7 @@ import QtQuick.Controls 2.14 as Controls import QtQuick.Layouts 1.14 import org.kde.kirigami 2.14 as Kirigami import QtMultimedia 5.15 +import QtGraphicalEffects 1.15 import org.kde.alligator 1.0 @@ -37,6 +38,7 @@ Kirigami.SwipeListItem { } } Image { + id: img asynchronous: true source: entry.image === "" ? "logo.png" : "file://"+Fetcher.image(entry.image) fillMode: Image.PreserveAspectFit @@ -47,6 +49,19 @@ Kirigami.SwipeListItem { Layout.maximumWidth: size Layout.rightMargin:Kirigami.Units.smallSpacing opacity: (entry.read) ? 0.5 : 1 + layer.enabled: true + layer.effect: OpacityMask { + maskSource: Item { + width: img.width + height: img.height + Rectangle { + anchors.centerIn: parent + width: img.adapt ? img.width : Math.min(img.width, img.height) + height: img.adapt ? img.height : width + radius: Math.min(width, height)/6 + } + } + } } ColumnLayout { spacing: Kirigami.Units.smallSpacing