Warning, /plasma-mobile/plasma-phonebook/src/contents/ui/ContactListItem.qml is written in an unsupported language. File is not indexed.

0001 /*
0002  * SPDX-FileCopyrightText: 2017-2019 Kaidan Developers and Contributors 
0003  * SPDX-FileCopyrightText: 2019 Jonah BrĂ¼chert <jbb@kaidan.im>
0004  *
0005  * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0006  */
0007 
0008 import QtQuick
0009 import QtQuick.Layouts
0010 import QtQuick.Controls as Controls
0011 
0012 import org.kde.kirigami as Kirigami
0013 import org.kde.kirigamiaddons.components as Components
0014 import org.kde.kirigamiaddons.delegates as Delegates
0015 import org.kde.people as KPeople
0016 
0017 Delegates.RoundedItemDelegate {
0018     id: listItem
0019 
0020     property string name
0021     property alias imageProviderUri: avatar.source
0022 
0023     contentItem: RowLayout {
0024         spacing: Kirigami.Units.largeSpacing
0025 
0026         Components.Avatar {
0027             id: avatar
0028             Layout.maximumHeight: parent.height
0029             Layout.maximumWidth: parent.height
0030             name: listItem.name
0031             imageMode: Components.Avatar.ImageMode.AdaptiveImageOrInitals
0032         }
0033 
0034         Kirigami.Heading {
0035             text: name
0036             textFormat: Text.PlainText
0037             elide: Text.ElideRight
0038             maximumLineCount: 1
0039             level: Kirigami.Settings.isMobile ? 3 : 5
0040             Layout.fillWidth: true
0041         }
0042     }
0043 }