From fbb96765b7039d74a2adaa0d17ed61ee64505786 Mon Sep 17 00:00:00 2001 From: Manuel Nickschas Date: Fri, 11 Jul 2008 01:35:47 +0200 Subject: [PATCH] Fix chars sometimes overflowing a tiny little bit --- src/qtui/chatitem.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.20.1