From 6f95a219a7a92e08d9b66e33e573be713df9eb8f Mon Sep 17 00:00:00 2001 From: nuuls Date: Tue, 16 Jan 2018 22:37:06 +0100 Subject: [PATCH] fixed it --- src/messages/layouts/messagelayout.cpp | 5 ++--- src/messages/messageelement.cpp | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/messages/layouts/messagelayout.cpp b/src/messages/layouts/messagelayout.cpp index 39cf327bc..acddd5e56 100644 --- a/src/messages/layouts/messagelayout.cpp +++ b/src/messages/layouts/messagelayout.cpp @@ -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)) { diff --git a/src/messages/messageelement.cpp b/src/messages/messageelement.cpp index 664756313..bae2e222a 100644 --- a/src/messages/messageelement.cpp +++ b/src/messages/messageelement.cpp @@ -225,7 +225,7 @@ void TimestampElement::addToContainer(MessageLayoutContainer &container, MessageElement::Flags _flags) { if (singletons::SettingManager::getInstance().timestampFormat != this->format) { - this->format = singletons::SettingManager::getInstance().timestampFormat; + this->format = singletons::SettingManager::getInstance().timestampFormat.getValue(); delete this->element; this->element = TimestampElement::formatTime(this->time); }