[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    =?utf-8?q?=5Bcalligra=5D_plugins/textshape=3A_proper_display_the?=
From:       Sebastian Sauer <sebastian.sauer () kdab ! com>
Date:       2011-04-30 17:24:32
Message-ID: 20110430172432.C50EDA60A9 () git ! kde ! org
[Download RAW message or body]

Git commit 3221e174b9b5822a69efcdfce17dc3cbea68ac21 by Sebastian Sauer.
Committed on 30/04/2011 at 19:23.
Pushed by sebsauer into branch 'master'.

proper display the Frame Borders.

M  +1    -10   plugins/textshape/TextShape.cpp     

http://commits.kde.org/calligra/3221e174b9b5822a69efcdfce17dc3cbea68ac21

diff --git a/plugins/textshape/TextShape.cpp b/plugins/textshape/TextShape.cpp
index 330b9f3..4a8dda1 100644
--- a/plugins/textshape/TextShape.cpp
+++ b/plugins/textshape/TextShape.cpp
@@ -198,23 +198,14 @@ void TextShape::paintDecorations(QPainter &painter, const KoViewConverter &conve
         if (qAbs(rotation()) > 1)
             painter.setRenderHint(QPainter::Antialiasing);
 
-        // Make the border not overwrite already drawn things like
-        // paragraph borders. DestinationOver and DestinationAtop
-        // gives slightly different results, but non are really good
-        // at low zooms.
-        painter.setCompositionMode(QPainter::CompositionMode_DestinationAtop);
-
-        QPen pen(QColor(210, 210, 210));
-        QPointF onePixel = converter.viewToDocument(QPointF(1.0, 1.0));
+        QPen pen(QColor(210, 210, 210)); // use cosmetic pen
 
         QPointF tl(0.0, 0.0);
         QRectF rect(tl, size());
-        pen.setWidthF(onePixel.y());
         painter.setPen(pen);
         painter.drawLine(rect.topLeft(), rect.topRight());
         painter.drawLine(rect.bottomLeft(), rect.bottomRight());
 
-        pen.setWidthF(onePixel.x());
         painter.setPen(pen);
         painter.drawLine(rect.topRight(), rect.bottomRight());
         painter.drawLine(rect.topLeft(), rect.bottomLeft());

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic