Port away from BasicListItem

For SynchronizationSettingsPage
This commit is contained in:
Alexey Andreyev 2023-09-27 01:19:34 +03:00
parent 51fdaeaddd
commit adc7339da7
1 changed files with 11 additions and 9 deletions

View File

@ -10,6 +10,7 @@ import QtQuick.Controls as Controls
import QtQuick.Layouts import QtQuick.Layouts
import org.kde.kirigami as Kirigami import org.kde.kirigami as Kirigami
import org.kde.kirigamiaddons.delegates as Delegates
import org.kde.kirigamiaddons.formcard as FormCard import org.kde.kirigamiaddons.formcard as FormCard
import org.kde.kasts import org.kde.kasts
@ -242,13 +243,15 @@ Kirigami.ScrollablePage {
"icon": "kaccounts-nextcloud", "icon": "kaccounts-nextcloud",
"provider": Sync.GPodderNextcloud}); "provider": Sync.GPodderNextcloud});
} }
delegate: Kirigami.BasicListItem { delegate: Delegates.RoundedItemDelegate {
id: syncProviderRepeaterDelegate
Layout.fillWidth: true Layout.fillWidth: true
label: model.name text: model.name
subtitle: model.subtitle
icon.name: model.icon icon.name: model.icon
//highlighted: false contentItem: Delegates.SubtitleContentItem {
iconSize: Kirigami.Units.gridUnit * 3 itemDelegate: syncProviderRepeaterDelegate
subtitle: model.subtitle
}
Keys.onReturnPressed: clicked() Keys.onReturnPressed: clicked()
onClicked: { onClicked: {
Sync.provider = model.provider; Sync.provider = model.provider;
@ -455,10 +458,9 @@ Kirigami.ScrollablePage {
id: deviceListModel id: deviceListModel
} }
delegate: Kirigami.BasicListItem { delegate: Delegates.RoundedItemDelegate {
label: model.device.caption text: model.device.caption
highlighted: false icon.name: model.device.type == "desktop" ? "computer" :
icon: model.device.type == "desktop" ? "computer" :
model.device.type == "laptop" ? "computer-laptop" : model.device.type == "laptop" ? "computer-laptop" :
model.device.type == "server" ? "network-server-database" : model.device.type == "server" ? "network-server-database" :
model.device.type == "mobile" ? "smartphone" : model.device.type == "mobile" ? "smartphone" :