mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Fixed drawing of currency icon with non-default scale in profile.
This commit is contained in:
parent
96398daa78
commit
5aba2f25cc
1 changed files with 10 additions and 7 deletions
|
@ -84,13 +84,16 @@ QImage MenuIconCurrency(const QSize &size) {
|
|||
w * 2),
|
||||
Qt::white);
|
||||
p.setCompositionMode(QPainter::CompositionMode_SourceOver);
|
||||
const auto i = IconCurrencyColored(
|
||||
st::inviteLinkSubscribeBoxTerms.style.font,
|
||||
st::infoIconFg->c);
|
||||
p.drawImage(
|
||||
(size.width() - i.width() / style::DevicePixelRatio()) / 2,
|
||||
(size.height() - i.height() / style::DevicePixelRatio()) / 2,
|
||||
i);
|
||||
|
||||
const auto s = Size(st::inviteLinkSubscribeBoxTerms.style.font->ascent);
|
||||
auto svg = QSvgRenderer(CurrencySvg(st::infoIconFg->c));
|
||||
svg.render(
|
||||
&p,
|
||||
QRectF(
|
||||
(size.width() - s.width()) / 2.,
|
||||
(size.height() - s.height()) / 2.,
|
||||
s.width(),
|
||||
s.height()));
|
||||
return image;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue