mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fix counter paint when DPR != 1 in Linux tray
This commit is contained in:
parent
2565b948d9
commit
3cb333d323
1 changed files with 3 additions and 2 deletions
|
@ -231,6 +231,7 @@ QIcon IconGraphic::trayIcon(
|
||||||
: st::trayCounterBg;
|
: st::trayCounterBg;
|
||||||
const auto &fg = st::trayCounterFg;
|
const auto &fg = st::trayCounterFg;
|
||||||
if (iconSize >= 22) {
|
if (iconSize >= 22) {
|
||||||
|
const auto imageSize = dprSize(iconImage);
|
||||||
const auto layerSize = (iconSize >= 48)
|
const auto layerSize = (iconSize >= 48)
|
||||||
? 32
|
? 32
|
||||||
: (iconSize >= 36)
|
: (iconSize >= 36)
|
||||||
|
@ -247,8 +248,8 @@ QIcon IconGraphic::trayIcon(
|
||||||
|
|
||||||
QPainter p(&iconImage);
|
QPainter p(&iconImage);
|
||||||
p.drawImage(
|
p.drawImage(
|
||||||
iconImage.width() - layer.width() - 1,
|
imageSize.width() - layer.width() - 1,
|
||||||
iconImage.height() - layer.height() - 1,
|
imageSize.height() - layer.height() - 1,
|
||||||
layer);
|
layer);
|
||||||
} else {
|
} else {
|
||||||
iconImage = Window::WithSmallCounter(std::move(iconImage), {
|
iconImage = Window::WithSmallCounter(std::move(iconImage), {
|
||||||
|
|
Loading…
Add table
Reference in a new issue