Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions Telegram/SourceFiles/history/view/media/history_view_photo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ void Photo::paintUserpicFrame(
auto request = ::Media::Streaming::FrameRequest();
request.outer = size * cIntRetinaFactor();
request.resize = size * cIntRetinaFactor();
request.radius = ImageRoundRadius::Ellipse;
request.radius = KotatoImageRoundRadius();
if (_streamed->instance.playerLocked()) {
if (_streamed->frozenFrame.isNull()) {
_streamed->frozenFrame = _streamed->instance.frame(request);
Expand All @@ -423,7 +423,7 @@ void Photo::paintUserpicFrame(
const auto pix = [&] {
const auto size = QSize(_pixw, _pixh);
const auto args = Images::PrepareArgs{
.options = Images::Option::RoundCircle,
.options = KotatoImageRoundOption(),
};
if (const auto large = _dataMedia->image(PhotoSize::Large)) {
return large->pix(size, args);
Expand Down Expand Up @@ -453,7 +453,19 @@ void Photo::paintUserpicFrame(
}
{
PainterHighQualityEnabler hq(p);
p.drawEllipse(inner);
switch (KotatoImageRoundRadius()) {
case ImageRoundRadius::None:
p.drawRoundedRect(inner, 0, 0);
break;
case ImageRoundRadius::Small:
p.drawRoundedRect(inner, st::buttonRadius, st::buttonRadius);
break;
case ImageRoundRadius::Large:
p.drawRoundedRect(inner, st::dateRadius, st::dateRadius);
break;
default:
p.drawEllipse(inner);
}
}
sti->historyFileThumbPlay.paintInCenter(p, inner);
}
Expand Down