-// WARNING: setColumns should not be used without either:
-// a) calling prepareGeometryChange() immediately before setColumns()
-// b) calling Chatline::setPos() immediately afterwards
-//
-// NOTE: senderPos and contentsPos are in ChatLines coordinate system!
-qreal ChatLine::setColumns(const qreal ×tampWidth, const qreal &senderWidth, const qreal &contentsWidth,
- const QPointF &senderPos, const QPointF &contentsPos) {
- prepareGeometryChange();
+// 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))