X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fchatlinemodelitem.cpp;h=1e12cd1a106f2d67ef08cd9a803a5b67a504dc03;hb=de8ae1e75bbe0b429647db7da758a51323385e57;hp=90691f8f5f1dd80441f71c14b8c993f5aaa7b2d8;hpb=fb44e08cc4f160cce624e39ceee2b8b9593f85a6;p=quassel.git diff --git a/src/qtui/chatlinemodelitem.cpp b/src/qtui/chatlinemodelitem.cpp index 90691f8f..1e12cd1a 100644 --- a/src/qtui/chatlinemodelitem.cpp +++ b/src/qtui/chatlinemodelitem.cpp @@ -24,7 +24,7 @@ #include "chatlinemodelitem.h" #include "chatlinemodel.h" #include "qtui.h" -#include "uistyle.h" +#include "qtuistyle.h" // This Struct is taken from Harfbuzz. We use it only to calc it's size. // we use a shared memory region so we do not have to malloc a buffer area for every line @@ -92,7 +92,7 @@ public: computeWrapList(); return _wrapList; } - + private: inline void style() { QtUiStyle::StyledMessage m = QtUi::style()->styleMessage(*_msgBuffer); @@ -156,6 +156,7 @@ private: } qreal wordendx = line.cursorToX(oldidx); qreal trailingendx = line.cursorToX(idx); + word.endX = wordendx; word.width = wordendx - wordstartx; word.trailing = trailingendx - wordendx; wordstartx = trailingendx; @@ -168,7 +169,7 @@ private: // the part " || (finder.position() == contents->plainText.length())" shouldn't be necessary // but in rare and indeterministic cases Qt states that the end of the text is not a boundary o_O } while(finder.isAtBoundary() || (finder.position() == contents->plainText.length())); - + // A QVector needs less space than a QList _wrapList.resize(wplist.count()); for(int i = 0; i < wplist.count(); i++) {