2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 06:07:45 +00:00

Fix filter type pic rounding

This commit is contained in:
RadRussianRus 2020-03-28 06:02:56 +03:00
parent 9ed04afee8
commit 9c00968379

View File

@ -336,7 +336,28 @@ void PaintFilterChatsTypeIcon(
auto hq = PainterHighQualityEnabler(p);
p.setBrush(color->b);
p.setPen(Qt::NoPen);
p.drawEllipse(rect);
switch (cUserpicCornersType()) {
case 0:
p.drawRoundedRect(
rect,
0, 0);
break;
case 1:
p.drawRoundedRect(
rect,
st::buttonRadius, st::buttonRadius);
break;
case 2:
p.drawRoundedRect(
rect,
st::dateRadius, st::dateRadius);
break;
default:
p.drawEllipse(rect);
}
icon.paintInCenter(p, rect);
}