Commit 54511d08 authored by Sébastien Blin's avatar Sébastien Blin

callview: draw presence when adding to a conference

Change-Id: I18f5a63191bf996c9072bdb412c1aedf4d6cbd41
parent 1aad3d8b
...@@ -1028,7 +1028,7 @@ CppImpl::add_present_contact(const std::string& uri, const std::string& custom_d ...@@ -1028,7 +1028,7 @@ CppImpl::add_present_contact(const std::string& uri, const std::string& custom_d
{ {
auto bestName = uri; auto bestName = uri;
auto default_avatar = Interfaces::PixbufManipulator().generateAvatar("", ""); auto default_avatar = Interfaces::PixbufManipulator().generateAvatar("", "");
auto default_scaled = Interfaces::PixbufManipulator().scaleAndFrame(default_avatar.get(), QSize(50, 50)); auto default_scaled = Interfaces::PixbufManipulator().scaleAndFrame(default_avatar.get(), QSize(48, 48), true, IconStatus::PRESENT);
auto photo = default_scaled; auto photo = default_scaled;
try { try {
...@@ -1046,7 +1046,7 @@ CppImpl::add_present_contact(const std::string& uri, const std::string& custom_d ...@@ -1046,7 +1046,7 @@ CppImpl::add_present_contact(const std::string& uri, const std::string& custom_d
if (!photostr.empty()) { if (!photostr.empty()) {
QByteArray byteArray(photostr.c_str(), photostr.length()); QByteArray byteArray(photostr.c_str(), photostr.length());
QVariant avatar = Interfaces::PixbufManipulator().personPhoto(byteArray); QVariant avatar = Interfaces::PixbufManipulator().personPhoto(byteArray);
auto pixbuf_photo = Interfaces::PixbufManipulator().scaleAndFrame(avatar.value<std::shared_ptr<GdkPixbuf>>().get(), QSize(48, 48)); auto pixbuf_photo = Interfaces::PixbufManipulator().scaleAndFrame(avatar.value<std::shared_ptr<GdkPixbuf>>().get(), QSize(48, 48), true, IconStatus::PRESENT);
if (avatar.isValid()) { if (avatar.isValid()) {
photo = pixbuf_photo; photo = pixbuf_photo;
} }
...@@ -1060,7 +1060,7 @@ CppImpl::add_present_contact(const std::string& uri, const std::string& custom_d ...@@ -1060,7 +1060,7 @@ CppImpl::add_present_contact(const std::string& uri, const std::string& custom_d
else else
fullUri = "sip:" + fullUri; fullUri = "sip:" + fullUri;
photo = Interfaces::PixbufManipulator().generateAvatar(firstLetter, fullUri); photo = Interfaces::PixbufManipulator().generateAvatar(firstLetter, fullUri);
photo = Interfaces::PixbufManipulator().scaleAndFrame(photo.get(), QSize(48, 48)); photo = Interfaces::PixbufManipulator().scaleAndFrame(photo.get(), QSize(48, 48), true, IconStatus::PRESENT);
} }
} catch (const std::out_of_range&) { } catch (const std::out_of_range&) {
// ContactModel::getContact() exception // ContactModel::getContact() exception
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment