2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-05 09:05:14 +00:00

New empty user/chat photos: with filled background and initials.

This commit is contained in:
John Preston
2016-12-29 13:03:51 +04:00
parent 204d91d567
commit 1d8e76aa08
35 changed files with 370 additions and 176 deletions

View File

@@ -612,7 +612,7 @@ void Notification::updateNotifyDisplay() {
if (!options.hideNameAndPhoto) {
_history->peer->loadUserpic(true, true);
_history->peer->paintUserpicLeft(p, st::notifyPhotoSize, st::notifyPhotoPos.x(), st::notifyPhotoPos.y(), width());
_history->peer->paintUserpicLeft(p, st::notifyPhotoPos.x(), st::notifyPhotoPos.y(), width(), st::notifyPhotoSize);
} else {
static QPixmap icon = App::pixmapFromImageInPlace(App::wnd()->iconLarge().scaled(st::notifyPhotoSize, st::notifyPhotoSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
icon.setDevicePixelRatio(cRetinaFactor());
@@ -680,7 +680,7 @@ void Notification::updatePeerPhoto() {
auto img = _cache.toImage();
{
Painter p(&img);
_peer->paintUserpicLeft(p, st::notifyPhotoSize, st::notifyPhotoPos.x(), st::notifyPhotoPos.y(), width());
_peer->paintUserpicLeft(p, st::notifyPhotoPos.x(), st::notifyPhotoPos.y(), width(), st::notifyPhotoSize);
}
_cache = App::pixmapFromImageInPlace(std_::move(img));
update();