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
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)) {

View file

@ -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);
}