diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp
index baf0b1f208b23e87edd7386c87c992926b3abf5d..c2457a3d9c8140c7debe3fcd2647c56a03c3b96a 100644
--- a/src/plugins/texteditor/basetexteditor.cpp
+++ b/src/plugins/texteditor/basetexteditor.cpp
@@ -2356,7 +2356,7 @@ void BaseTextEditor::extraAreaPaintEvent(QPaintEvent *e)
 
                 if (drawBox) {
                     bool expanded = nextBlock.isVisible();
-                    QRect box(extraAreaWidth + collapseBoxWidth/4 + 1, top + collapseBoxWidth/4,
+                    QRect box(extraAreaWidth + collapseBoxWidth/4, top + collapseBoxWidth/4,
                               2 * (collapseBoxWidth/4) + 1, 2 * (collapseBoxWidth/4) + 1);
                     drawFoldingMarker(&painter, box, expanded, active);
                 }
@@ -2406,7 +2406,7 @@ void BaseTextEditor::drawFoldingMarker(QPainter *painter, const QRect &rect,
                                        bool expanded, bool hovered) const
 {
     QStyleOptionViewItemV2 opt;
-    opt.rect = QRect(rect.center(), QSize());
+    opt.rect = rect;
     opt.state = QStyle::State_Active | QStyle::State_Item | QStyle::State_Children;
 
     if (expanded)