From e1c032f3256318f63dfd67d661099f790e4097fc Mon Sep 17 00:00:00 2001
From: con <qtc-committer@nokia.com>
Date: Thu, 6 May 2010 15:26:55 +0200
Subject: [PATCH] Fix drawing of collapse block indicator (fractional font
 sizes).
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Task-number: QTCREATORBUG-1319
Reviewed-by: Thorbjørn Lindeijer
---
 src/plugins/texteditor/basetexteditor.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp
index 18547bb8794..d4e496c22b5 100644
--- a/src/plugins/texteditor/basetexteditor.cpp
+++ b/src/plugins/texteditor/basetexteditor.cpp
@@ -2802,7 +2802,6 @@ static void drawRectBox(QPainter *painter, const QRect &rect, bool start, bool e
     grad.setColorAt(0, c.lighter(110));
     grad.setColorAt(1, c.lighter(130));
     QColor outline = c;
-    QRect r = rect;
 
     painter->fillRect(rect, grad);
     painter->setPen(outline);
@@ -2954,7 +2953,9 @@ void BaseTextEditor::extraAreaPaintEvent(QPaintEvent *e)
 
                 int boxWidth = collapseBoxWidth(fm);
                 if (hovered) {
-                    QRect box = QRect(extraAreaWidth + 1, top, boxWidth - 2, bottom - top);
+                    int itop = qRound(top);
+                    int ibottom = qRound(bottom);
+                    QRect box = QRect(extraAreaWidth + 1, itop, boxWidth - 2, ibottom - itop);
                     drawRectBox(&painter, box, drawStart, drawEnd, pal);
                 }
 
-- 
GitLab