2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Move EmptyUserpic from data_peer to empty_userpic.

This commit is contained in:
John Preston
2017-12-05 12:43:18 +04:00
parent 68009b6fba
commit 5eeb8143b6
14 changed files with 346 additions and 303 deletions

View File

@@ -29,6 +29,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#include "ui/widgets/shadow.h"
#include "ui/effects/ripple_animation.h"
#include "ui/wrap/fade_wrap.h"
#include "ui/empty_userpic.h"
#include "messenger.h"
#include "mainwindow.h"
#include "lang/lang_keys.h"
@@ -484,7 +485,10 @@ void Panel::createUserpicCache(ImagePtr image) {
filled.setDevicePixelRatio(cRetinaFactor());
{
Painter p(&filled);
EmptyUserpic(_user->id, _user->name).paintSquare(p, 0, 0, st::callWidth, st::callWidth);
Ui::EmptyUserpic(
Data::PeerUserpicColor(_user->id),
_user->name
).paintSquare(p, 0, 0, st::callWidth, st::callWidth);
}
Images::prepareRound(filled, ImageRoundRadius::Large, ImageRoundCorner::TopLeft | ImageRoundCorner::TopRight);
_userPhoto = App::pixmapFromImageInPlace(std::move(filled));