mirror of https://github.com/KDE/kasts.git
Add rounding to images in genericentrydelegate
Also remove the unused rounding in the feedlistdelegate
This commit is contained in:
parent
2b5597cbd6
commit
20b767711a
|
@ -31,19 +31,6 @@ Item {
|
||||||
height: cardSize - cardMargin
|
height: cardSize - cardMargin
|
||||||
width: 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 {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
|
|
@ -10,6 +10,7 @@ import QtQuick.Controls 2.14 as Controls
|
||||||
import QtQuick.Layouts 1.14
|
import QtQuick.Layouts 1.14
|
||||||
import org.kde.kirigami 2.14 as Kirigami
|
import org.kde.kirigami 2.14 as Kirigami
|
||||||
import QtMultimedia 5.15
|
import QtMultimedia 5.15
|
||||||
|
import QtGraphicalEffects 1.15
|
||||||
import org.kde.alligator 1.0
|
import org.kde.alligator 1.0
|
||||||
|
|
||||||
|
|
||||||
|
@ -37,6 +38,7 @@ Kirigami.SwipeListItem {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Image {
|
Image {
|
||||||
|
id: img
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
source: entry.image === "" ? "logo.png" : "file://"+Fetcher.image(entry.image)
|
source: entry.image === "" ? "logo.png" : "file://"+Fetcher.image(entry.image)
|
||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
|
@ -47,6 +49,19 @@ Kirigami.SwipeListItem {
|
||||||
Layout.maximumWidth: size
|
Layout.maximumWidth: size
|
||||||
Layout.rightMargin:Kirigami.Units.smallSpacing
|
Layout.rightMargin:Kirigami.Units.smallSpacing
|
||||||
opacity: (entry.read) ? 0.5 : 1
|
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 {
|
ColumnLayout {
|
||||||
spacing: Kirigami.Units.smallSpacing
|
spacing: Kirigami.Units.smallSpacing
|
||||||
|
|
Loading…
Reference in New Issue