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:
@@ -29,6 +29,7 @@ enum class MessageFlag : uint16_t {
|
||||
Subscription = (1 << 12),
|
||||
Notification = (1 << 13),
|
||||
AutoMod = (1 << 14),
|
||||
RecentMessage = (1 << 15),
|
||||
};
|
||||
using MessageFlags = FlagsEnum<MessageFlag>;
|
||||
|
||||
|
||||
@@ -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())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user