added wip effect for (dis/re)connected messages
This commit is contained in:
@@ -103,6 +103,9 @@ void MessageLayout::actuallyLayout(int width, MessageElementFlags _flags)
|
||||
{
|
||||
this->layoutCount_++;
|
||||
|
||||
const auto addTest = this->message_->flags.hasAny(
|
||||
{MessageFlag::DisconnectedMessage, MessageFlag::ConnectedMessage});
|
||||
|
||||
auto messageFlags = this->message_->flags;
|
||||
|
||||
if (this->flags.has(MessageLayoutFlag::Expanded) ||
|
||||
@@ -114,11 +117,27 @@ void MessageLayout::actuallyLayout(int width, MessageElementFlags _flags)
|
||||
|
||||
this->container_->begin(width, this->scale_, messageFlags);
|
||||
|
||||
if (addTest)
|
||||
{
|
||||
this->container_->addElementNoLineBreak(new TestLayoutElement(
|
||||
EmptyElement::instance(), QSize(width, this->scale_ * 6),
|
||||
getTheme()->messages.backgrounds.regular, false));
|
||||
this->container_->breakLine();
|
||||
}
|
||||
|
||||
for (const auto &element : this->message_->elements)
|
||||
{
|
||||
element->addToContainer(*this->container_, _flags);
|
||||
}
|
||||
|
||||
if (addTest)
|
||||
{
|
||||
this->container_->breakLine();
|
||||
this->container_->addElement(new TestLayoutElement(
|
||||
EmptyElement::instance(), QSize(width, this->scale_ * 6),
|
||||
getTheme()->messages.backgrounds.regular, true));
|
||||
}
|
||||
|
||||
if (this->height_ != this->container_->getHeight())
|
||||
{
|
||||
this->deleteBuffer();
|
||||
@@ -179,6 +198,11 @@ void MessageLayout::paint(QPainter &painter, int width, int y, int messageIndex,
|
||||
{
|
||||
painter.fillRect(0, y, pixmap->width(), pixmap->height(),
|
||||
app->themes->messages.disabled);
|
||||
// painter.fillRect(0, y, pixmap->width(), pixmap->height(),
|
||||
// QBrush(QColor(64, 64, 64, 64)));
|
||||
painter.fillRect(0, y, pixmap->width(), pixmap->height(),
|
||||
QBrush(QColor(255, 0, 0, 63), Qt::BDiagPattern));
|
||||
// app->themes->messages.disabled);
|
||||
}
|
||||
|
||||
// draw selection
|
||||
|
||||
Reference in New Issue
Block a user