This commit is contained in:
nuuls
2018-01-16 22:37:06 +01:00
parent 285c2e8688
commit 6f95a219a7
2 changed files with 3 additions and 4 deletions
+2 -3
View File
@@ -147,9 +147,8 @@ void MessageLayout::paint(QPainter &painter, int y, int messageIndex, Selection
// create new buffer if required
if (!pixmap) {
#ifdef Q_OS_MACOS
pixmap =
new QPixmap((int)(this->container.getWidth() * painter.device()->devicePixelRatioF()),
new QPixmap((int)(this->container.width * painter.device()->devicePixelRatioF()),
(int)(this->container.getHeight() * painter.device()->devicePixelRatioF()));
pixmap->setDevicePixelRatio(painter.device()->devicePixelRatioF());
#else
@@ -165,7 +164,7 @@ void MessageLayout::paint(QPainter &painter, int y, int messageIndex, Selection
}
// draw on buffer
painter.drawPixmap(0, y, pixmap->width(), pixmap->height(), *pixmap);
painter.drawPixmap(0, y, this->container.width, this->container.getHeight(), *pixmap);
// draw disabled
if (this->message->hasFlags(Message::Disabled)) {