From: Manuel Nickschas Date: Thu, 10 Jul 2008 23:35:47 +0000 (+0200) Subject: Fix chars sometimes overflowing a tiny little bit X-Git-Tag: 0.3.0~167 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=fbb96765b7039d74a2adaa0d17ed61ee64505786 Fix chars sometimes overflowing a tiny little bit --- diff --git a/src/qtui/chatitem.cpp b/src/qtui/chatitem.cpp index b5fb62ae..dfb069ea 100644 --- a/src/qtui/chatitem.cpp +++ b/src/qtui/chatitem.cpp @@ -91,8 +91,8 @@ int ChatItem::WrapColumnFinder::nextWrapColumn() { line.setLineWidth(item->width()); layout->endLayout(); } - int idx = line.xToCursor(lastwrappos + item->width()); - qreal x = line.cursorToX(idx); + int idx = line.xToCursor(lastwrappos + item->width(), QTextLine::CursorOnCharacter); + qreal x = line.cursorToX(idx, QTextLine::Trailing); w = w - wrapList.at(wordidx).width - (x - lastwrappos); lastwrappos = x; lastwrapcol = idx;