From 425c61f6245240c0d6ee2d06c55d4cdd591fb3c4 Mon Sep 17 00:00:00 2001 From: Roberto Raggi Date: Fri, 4 Dec 2009 13:03:22 +0100 Subject: [PATCH] Fixed drop shadow Done with: mae --- src/plugins/texteditor/texteditoroverlay.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/texteditor/texteditoroverlay.cpp b/src/plugins/texteditor/texteditoroverlay.cpp index 5a7d9f22a95..a0f2a0473de 100644 --- a/src/plugins/texteditor/texteditoroverlay.cpp +++ b/src/plugins/texteditor/texteditoroverlay.cpp @@ -332,7 +332,9 @@ void TextEditorOverlay::paintSelection(QPainter *painter, painter->save(); QPainterPath shadow = path; shadow.translate(m_dropShadowWidth, m_dropShadowWidth); - painter->setClipPath(shadow.intersected(path)); + QPainterPath clip; + clip.addRect(m_editor->viewport()->rect()); + painter->setClipPath(clip - path); painter->fillPath(shadow, QColor(0, 0, 0, 100)); painter->restore(); }