This commit is contained in:
nuuls 2018-01-16 22:37:06 +01:00
parent 285c2e8688
commit 6f95a219a7
No known key found for this signature in database
GPG key ID: 7A0B673A2D4BF257
2 changed files with 3 additions and 4 deletions

View file

@ -147,9 +147,8 @@ void MessageLayout::paint(QPainter &painter, int y, int messageIndex, Selection
// create new buffer if required // create new buffer if required
if (!pixmap) { if (!pixmap) {
#ifdef Q_OS_MACOS #ifdef Q_OS_MACOS
pixmap = 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())); (int)(this->container.getHeight() * painter.device()->devicePixelRatioF()));
pixmap->setDevicePixelRatio(painter.device()->devicePixelRatioF()); pixmap->setDevicePixelRatio(painter.device()->devicePixelRatioF());
#else #else
@ -165,7 +164,7 @@ void MessageLayout::paint(QPainter &painter, int y, int messageIndex, Selection
} }
// draw on buffer // 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 // draw disabled
if (this->message->hasFlags(Message::Disabled)) { if (this->message->hasFlags(Message::Disabled)) {

View file

@ -225,7 +225,7 @@ void TimestampElement::addToContainer(MessageLayoutContainer &container,
MessageElement::Flags _flags) MessageElement::Flags _flags)
{ {
if (singletons::SettingManager::getInstance().timestampFormat != this->format) { if (singletons::SettingManager::getInstance().timestampFormat != this->format) {
this->format = singletons::SettingManager::getInstance().timestampFormat; this->format = singletons::SettingManager::getInstance().timestampFormat.getValue();
delete this->element; delete this->element;
this->element = TimestampElement::formatTime(this->time); this->element = TimestampElement::formatTime(this->time);
} }