summary refs log tree commit diff
path: root/src/RoomInfoListItem.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2020-04-29 20:23:00 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2020-04-29 20:23:00 +0200
commit27350cf51e3ea9a29e475f0bbb7a245220447c68 (patch)
tree60a25df221fa58c197ddd01441128a5397cf0c45 /src/RoomInfoListItem.cpp
parentSend correct orientation for exif rotated images (diff)
downloadnheko-27350cf51e3ea9a29e475f0bbb7a245220447c68.tar.xz
Fix high CPU usage on high dpi screens
Fixes #180
Diffstat (limited to 'src/RoomInfoListItem.cpp')
-rw-r--r--src/RoomInfoListItem.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/RoomInfoListItem.cpp b/src/RoomInfoListItem.cpp
index 11818649..13c7b54d 100644
--- a/src/RoomInfoListItem.cpp
+++ b/src/RoomInfoListItem.cpp
@@ -151,7 +151,8 @@ RoomInfoListItem::paintEvent(QPaintEvent *event)
 
         auto wm = getMetrics(QFont{});
 
-        QPixmap pixmap(avatar_->size());
+        QPixmap pixmap(avatar_->size() * p.device()->devicePixelRatioF());
+        pixmap.setDevicePixelRatio(p.device()->devicePixelRatioF());
         if (isPressed_) {
                 p.fillRect(rect(), highlightedBackgroundColor_);
                 titlePen.setColor(highlightedTitleColor_);