void ChatLine::setGeometryByWidth(const qreal &width, const qreal &contentsWidth, qreal &linePos) {
qreal height = _contentsItem.setGeometryByWidth(contentsWidth);
linePos -= height;
void ChatLine::setGeometryByWidth(const qreal &width, const qreal &contentsWidth, qreal &linePos) {
qreal height = _contentsItem.setGeometryByWidth(contentsWidth);
linePos -= height;
BufferId bufferId = BufferId(chatScene()->idString().toInt());
MsgId lastSeenMsgId = Client::networkModel()->lastSeenMarkerMsgId(bufferId);
if(lastSeenMsgId < myMsgId && lastSeenMsgId >= prevMsgId) {
BufferId bufferId = BufferId(chatScene()->idString().toInt());
MsgId lastSeenMsgId = Client::networkModel()->lastSeenMarkerMsgId(bufferId);
if(lastSeenMsgId < myMsgId && lastSeenMsgId >= prevMsgId) {
QLinearGradient gradient(0, 0, 0, contentsItem().fontMetrics()->lineSpacing());
QLinearGradient gradient(0, 0, 0, contentsItem().fontMetrics()->lineSpacing());
gradient.setColorAt(0.1, Qt::transparent);
painter->fillRect(boundingRect(), gradient);
}
gradient.setColorAt(0.1, Qt::transparent);
painter->fillRect(boundingRect(), gradient);
}