Added thumbnail image

This commit is contained in:
Digital Artifex
2026-06-17 14:50:55 -04:00
parent 3f9b33c74d
commit ac71b74ed0
+20 -5
View File
@@ -7,7 +7,6 @@ Item {
property string description: "This is a description of the search result item" property string description: "This is a description of the search result item"
property string title: "Wallpaper Title" property string title: "Wallpaper Title"
property string thumbnail: "" property string thumbnail: ""
property string url: ""
property string uuid: "" property string uuid: ""
property bool selected: false property bool selected: false
@@ -18,7 +17,8 @@ Item {
height: 256 height: 256
clip: true clip: true
Rectangle { Rectangle
{
id: searchResultItemContainer id: searchResultItemContainer
anchors.fill: parent anchors.fill: parent
@@ -26,10 +26,12 @@ Item {
color: palette.alternateBase.lighter(1.25) color: palette.alternateBase.lighter(1.25)
ColumnLayout { ColumnLayout
{
anchors.fill: parent anchors.fill: parent
Rectangle { Rectangle
{
Layout.preferredWidth: 250 Layout.preferredWidth: 250
Layout.preferredHeight: 141 Layout.preferredHeight: 141
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
@@ -38,6 +40,14 @@ Item {
border.color: palette.alternateBase.lighter(1.75) border.color: palette.alternateBase.lighter(1.75)
color: palette.base.lighter(1.25) color: palette.base.lighter(1.25)
Image
{
anchors.fill: parent
fillMode: Image.PreserveAspectCrop
id: thumnailImage
source: searchResultItemRoot.thumbnail
}
} }
Text { Text {
@@ -63,14 +73,19 @@ Item {
} }
Text { Text {
clip: true
color: palette.text color: palette.text
font.pixelSize: 12 font.pixelSize: 12
text: searchResultItemRoot.description text: searchResultItemRoot.description
wrapMode: Text.WrapAtWordBoundaryOrAnywhere wrapMode: Text.WrapAtWordBoundaryOrAnywhere
textFormat: Text.PlainText
Layout.maximumHeight: 32
Layout.preferredHeight: 32
elide: Text.ElideRight
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
Layout.preferredWidth: 236 Layout.preferredWidth: 236
Layout.maximumWidth: 236
Layout.bottomMargin: 3 Layout.bottomMargin: 3
} }
} }