+// NOTE: senderPos is in ChatLines coordinate system!
+void ChatLine::setFirstColumn(const qreal ×tampWidth, const qreal &senderWidth, const QPointF &senderPos) {
+ _timestampItem.prepareGeometryChange();
+ _timestampItem.setGeometry(timestampWidth, _height);
+ // senderItem doesn't need a geom change as it's Pos is changed (ensured by void ChatScene::firstHandlePositionChanged(qreal xpos))
+ _senderItem.setGeometry(senderWidth, _height);
+ _senderItem.setPos(senderPos);
+}
+
+// NOTE: contentsPos is in ChatLines coordinate system!
+void ChatLine::setSecondColumn(const qreal &senderWidth, const qreal &contentsWidth,
+ const QPointF &contentsPos, qreal &linePos) {
+ // contentsItem doesn't need a geom change as it's Pos is changed (ensured by void ChatScene::firstHandlePositionChanged(qreal xpos))
+ qreal height = _contentsItem.setGeometryByWidth(contentsWidth);
+ linePos -= height;
+ bool needGeometryChange = linePos == pos().y();
+
+ if(needGeometryChange) {
+ _timestampItem.prepareGeometryChange();
+ _senderItem.prepareGeometryChange();
+ }
+ _timestampItem.setHeight(height);
+ _senderItem.setGeometry(senderWidth, height);
+
+ _contentsItem.setPos(contentsPos);
+
+ if(needGeometryChange)