X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatline.cpp;h=24e4a5d104a94e435682381d00f14545c13de75c;hp=f86005e596cc0cedfb70c79987597e4c4703e2c5;hb=62192fb6cd9cc211b5b9fe844c9b4c2f98f923cc;hpb=630dbdaf56fcee546387275898bde59426da71cb diff --git a/src/qtui/chatline.cpp b/src/qtui/chatline.cpp index f86005e5..24e4a5d1 100644 --- a/src/qtui/chatline.cpp +++ b/src/qtui/chatline.cpp @@ -27,6 +27,7 @@ #include "client.h" #include "chatitem.h" #include "chatline.h" +#include "columnhandleitem.h" #include "messagemodel.h" #include "networkmodel.h" #include "qtui.h" @@ -68,15 +69,15 @@ ChatItem &ChatLine::item(ChatLineModel::ColumnType column) { qreal ChatLine::setGeometry(qreal width) { if(width != _width) prepareGeometryChange(); - QRectF firstColHandleRect = chatScene()->firstColumnHandleRect(); - QRectF secondColHandleRect = chatScene()->secondColumnHandleRect(); - _height = _contentsItem.setGeometry(width - secondColHandleRect.right()); - _timestampItem.setGeometry(firstColHandleRect.left(), _height); - _senderItem.setGeometry(secondColHandleRect.left() - firstColHandleRect.right(), _height); + ColumnHandleItem *firstColumnHandle = chatScene()->firstColumnHandle(); + ColumnHandleItem *secondColumnHandle = chatScene()->secondColumnHandle(); + _height = _contentsItem.setGeometry(width - secondColumnHandle->sceneRight()); + _timestampItem.setGeometry(firstColumnHandle->sceneLeft(), _height); + _senderItem.setGeometry(secondColumnHandle->sceneLeft() - firstColumnHandle->sceneRight(), _height); - _senderItem.setPos(firstColHandleRect.right(), 0); - _contentsItem.setPos(secondColHandleRect.right(), 0); + _senderItem.setPos(firstColumnHandle->sceneRight(), 0); + _contentsItem.setPos(secondColumnHandle->sceneRight(), 0); _width = width; return _height;