From 1bfa97d4fdec57395061ce20f3a9a848509387b3 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 1 Nov 2021 16:07:40 +0400 Subject: [PATCH] Fix invite link icons on macOS Retina. --- .../boxes/peers/edit_peer_invite_links.cpp | 18 +++++++++++------- Telegram/build/prepare/prepare.py | 2 +- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Telegram/SourceFiles/boxes/peers/edit_peer_invite_links.cpp b/Telegram/SourceFiles/boxes/peers/edit_peer_invite_links.cpp index d5bc7d755..5a187af23 100644 --- a/Telegram/SourceFiles/boxes/peers/edit_peer_invite_links.cpp +++ b/Telegram/SourceFiles/boxes/peers/edit_peer_invite_links.cpp @@ -251,8 +251,10 @@ not_null 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 }); diff --git a/Telegram/build/prepare/prepare.py b/Telegram/build/prepare/prepare.py index ca0d07cd1..8323f5072 100644 --- a/Telegram/build/prepare/prepare.py +++ b/Telegram/build/prepare/prepare.py @@ -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', """