Historic messages behaviour

"Crossed and Greyed" -> default (and is current default)
"Crossed" -> just crossed
"Greyed" -> just greyed
"No change" -> no change in appearance
This commit is contained in:
hemirt
2019-01-27 22:15:59 +01:00
parent 498fb3717e
commit 441f6189a1
6 changed files with 39 additions and 8 deletions
+26
View File
@@ -205,6 +205,32 @@ void MessageLayout::paint(QPainter &painter, int width, int y, int messageIndex,
// app->themes->messages.disabled);
}
if (this->message_->flags.has(MessageFlag::RecentMessage))
{
const auto &setting =
getSettings()->historicMessagesAppearance.getValue();
/// hemirt: for options check the options associated with the setting
/// historicMessagesAppearance in GeneralPage.cpp (and default in
/// Settings.hpp)
if (setting == "Crossed and Greyed")
{
painter.fillRect(0, y, pixmap->width(), pixmap->height(),
QBrush(QColor(255, 0, 0, 63), Qt::BDiagPattern));
painter.fillRect(0, y, pixmap->width(), pixmap->height(),
app->themes->messages.disabled);
}
else if (setting == "Crossed")
{
painter.fillRect(0, y, pixmap->width(), pixmap->height(),
QBrush(QColor(255, 0, 0, 63), Qt::BDiagPattern));
}
else if (setting == "Greyed")
{
painter.fillRect(0, y, pixmap->width(), pixmap->height(),
app->themes->messages.disabled);
}
}
// draw selection
if (!selection.isEmpty())
{