Port away from BasicListItem

For GlobalSearchField
This commit is contained in:
Alexey Andreyev 2023-09-27 01:07:58 +03:00
parent 4f179341e6
commit 51fdaeaddd
1 changed files with 11 additions and 9 deletions

View File

@ -10,6 +10,7 @@ import QtQuick.Layouts
import QtQml.Models import QtQml.Models
import org.kde.kirigami as Kirigami import org.kde.kirigami as Kirigami
import org.kde.kirigamiaddons.delegates as Delegates
import org.kde.kirigamiaddons.labs.components as Addons import org.kde.kirigamiaddons.labs.components as Addons
import org.kde.kasts import org.kde.kasts
@ -76,16 +77,17 @@ Addons.SearchPopupField {
model: globalSearchField.searchFilter === "" ? null : proxyModel model: globalSearchField.searchFilter === "" ? null : proxyModel
delegate: Component { delegate: Delegates.RoundedItemDelegate {
Kirigami.BasicListItem { id: searchListDelegate
separatorVisible: true text: model.entry.title
icon.source: model.entry.cachedImage icon.source: model.entry.cachedImage
label: model.entry.title contentItem: Delegates.SubtitleContentItem {
itemDelegate: searchListDelegate
subtitle: model.entry.feed.name subtitle: model.entry.feed.name
onClicked: { }
globalSearchField.openEntry(model.entry); onClicked: {
globalSearchField.popup.close(); globalSearchField.openEntry(model.entry);
} globalSearchField.popup.close();
} }
} }
Kirigami.PlaceholderMessage { Kirigami.PlaceholderMessage {