diff options
author | link2xt <link2xt@testrun.org> | 2021-08-15 00:01:24 +0000 |
---|---|---|
committer | link2xt <link2xt@testrun.org> | 2021-08-15 00:01:24 +0000 |
commit | 0114c54ff12d7f9cecf4637ba1d43b5e887a736f (patch) | |
tree | 3026310a13b72a36d2deef9f4fd30d86a74c9952 | |
parent | f0e9eb6f6b4bd57532966310e1fdf88ee4f1eb53 (diff) | |
download | kdeltachat-0114c54ff12d7f9cecf4637ba1d43b5e887a736f.tar.gz kdeltachat-0114c54ff12d7f9cecf4637ba1d43b5e887a736f.zip |
Add avatars to New Chat page
-rw-r--r-- | qml/NewChatPage.qml | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/qml/NewChatPage.qml b/qml/NewChatPage.qml index cc14185..d848c17 100644 --- a/qml/NewChatPage.qml +++ b/qml/NewChatPage.qml @@ -1,7 +1,7 @@ import QtQuick 2.12 import QtQuick.Controls 2.12 import QtQuick.Layouts 1.12 -import org.kde.kirigami 2.12 as Kirigami +import org.kde.kirigami 2.13 as Kirigami import DeltaChat 1.0 @@ -40,11 +40,31 @@ Kirigami.ScrollablePage { model: contactsModel currentIndex: -1 - delegate: Kirigami.BasicListItem { + delegate: Kirigami.AbstractListItem { property DcContact contact: context.getContact(model.contactId) - - label: contact.displayName - subtitle: contact.addr + property string profileImage: contact.getProfileImage() + + RowLayout { + Kirigami.Avatar { + name: contact.displayName + color: contact.color + source: profileImage ? "file:" + profileImage : "" + } + + ColumnLayout { + Layout.fillWidth: true + Label { + text: contact.displayName + font.weight: Font.Bold + Layout.fillWidth: true + } + Label { + text: contact.addr + font: Kirigami.Theme.smallFont + Layout.fillWidth: true + } + } + } } Kirigami.PlaceholderMessage { |