Fix userpics in calls top bar
This commit is contained in:
parent
b6be1f4d9f
commit
183762b88c
1 changed files with 6 additions and 1 deletions
|
|
@ -376,7 +376,12 @@ QPixmap PeerData::genUserpic(
|
||||||
std::shared_ptr<Data::CloudImageView> &view,
|
std::shared_ptr<Data::CloudImageView> &view,
|
||||||
int size) const {
|
int size) const {
|
||||||
if (const auto userpic = currentUserpic(view)) {
|
if (const auto userpic = currentUserpic(view)) {
|
||||||
return userpic->pixCircled(size, size);
|
switch (cUserpicCornersType()) {
|
||||||
|
case 0: return userpic->pixRounded(size, size, ImageRoundRadius::None);
|
||||||
|
case 1: return userpic->pixRounded(size, size, ImageRoundRadius::Small);
|
||||||
|
case 2: return userpic->pixRounded(size, size, ImageRoundRadius::Large);
|
||||||
|
default: return userpic->pixCircled(size, size);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
auto result = QImage(QSize(size, size) * cIntRetinaFactor(), QImage::Format_ARGB32_Premultiplied);
|
auto result = QImage(QSize(size, size) * cIntRetinaFactor(), QImage::Format_ARGB32_Premultiplied);
|
||||||
result.setDevicePixelRatio(cRetinaFactor());
|
result.setDevicePixelRatio(cRetinaFactor());
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue