From 3cb333d3236ee16f3a37c4b13dc0ea40b41bf43d Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Fri, 9 Dec 2022 14:50:44 +0400 Subject: [PATCH] Fix counter paint when DPR != 1 in Linux tray --- Telegram/SourceFiles/platform/linux/tray_linux.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/platform/linux/tray_linux.cpp b/Telegram/SourceFiles/platform/linux/tray_linux.cpp index b4e9c6f88b..8af4b27674 100644 --- a/Telegram/SourceFiles/platform/linux/tray_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/tray_linux.cpp @@ -231,6 +231,7 @@ QIcon IconGraphic::trayIcon( : st::trayCounterBg; const auto &fg = st::trayCounterFg; if (iconSize >= 22) { + const auto imageSize = dprSize(iconImage); const auto layerSize = (iconSize >= 48) ? 32 : (iconSize >= 36) @@ -247,8 +248,8 @@ QIcon IconGraphic::trayIcon( QPainter p(&iconImage); p.drawImage( - iconImage.width() - layer.width() - 1, - iconImage.height() - layer.height() - 1, + imageSize.width() - layer.width() - 1, + imageSize.height() - layer.height() - 1, layer); } else { iconImage = Window::WithSmallCounter(std::move(iconImage), {