mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-01 15:05:56 +00:00
Fix counter paint when DPR != 1 in Linux tray
This commit is contained in:
@@ -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), {
|
||||||
|
Reference in New Issue
Block a user