Fix invite link icons on macOS Retina.

This commit is contained in:
John Preston 2021-11-01 16:07:40 +04:00
parent 3b4b5d3576
commit 1bfa97d4fd
2 changed files with 12 additions and 8 deletions

View file

@ -251,8 +251,10 @@ not_null<Ui::SettingsButton*> AddCreateLinkButton(
p.setPen(Qt::NoPen);
p.setBrush(st::windowBgActive);
const auto rect = icon->rect();
auto hq = PainterHighQualityEnabler(p);
p.drawEllipse(rect);
{
auto hq = PainterHighQualityEnabler(p);
p.drawEllipse(rect);
}
st::inviteLinkCreateIcon.paintInCenter(p, rect);
}, icon->lifetime());
return result;
@ -701,12 +703,14 @@ void LinksController::rowPaintIcon(
auto p = QPainter(&icon);
p.setPen(Qt::NoPen);
p.setBrush(*bg);
auto hq = PainterHighQualityEnabler(p);
auto rect = QRect(0, 0, inner, inner);
if (color == Color::Expiring || color == Color::ExpireSoon) {
rect = rect.marginsRemoved({ stroke, stroke, stroke, stroke });
{
auto hq = PainterHighQualityEnabler(p);
auto rect = QRect(0, 0, inner, inner);
if (color == Color::Expiring || color == Color::ExpireSoon) {
rect = rect.marginsRemoved({ stroke, stroke, stroke, stroke });
}
p.drawEllipse(rect);
}
p.drawEllipse(rect);
(color == Color::Revoked
? st::inviteLinkRevokedIcon
: st::inviteLinkIcon).paintInCenter(p, { 0, 0, inner, inner });

View file

@ -401,7 +401,7 @@ if customRunCommand:
stage('patches', """
git clone https://github.com/desktop-app/patches.git
cd patches
git checkout 0ddad09b1e
git checkout 7aeeaa9f17
""")
stage('depot_tools', """