[qet] [3750] Element editor : improve visual grid point (set cosmectic)

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 3750
Author:   blacksun
Date:     2015-02-21 22:36:25 +0100 (Sat, 21 Feb 2015)
Log Message:
-----------
Element editor : improve visual grid point (set cosmectic)

Modified Paths:
--------------
    branches/Qt5/sources/editor/elementscene.cpp
    branches/Qt5/sources/editor/elementview.cpp

Modified: branches/Qt5/sources/editor/elementscene.cpp
===================================================================
--- branches/Qt5/sources/editor/elementscene.cpp	2015-02-21 21:24:32 UTC (rev 3749)
+++ branches/Qt5/sources/editor/elementscene.cpp	2015-02-21 21:36:25 UTC (rev 3750)
@@ -187,7 +187,9 @@
 	p -> setRenderHint(QPainter::TextAntialiasing, true);
 	p -> setRenderHint(QPainter::SmoothPixmapTransform, false);
 	
-	p -> setPen(Qt::red);
+	QPen pen(Qt::red);
+	pen.setCosmetic(true);
+	p -> setPen(pen);
 	p -> setBrush(Qt::NoBrush);
 	p -> drawLine(-20, 0, 20, 0);
 	p -> drawLine(0, -20, 0, 20);

Modified: branches/Qt5/sources/editor/elementview.cpp
===================================================================
--- branches/Qt5/sources/editor/elementview.cpp	2015-02-21 21:24:32 UTC (rev 3749)
+++ branches/Qt5/sources/editor/elementview.cpp	2015-02-21 21:36:25 UTC (rev 3750)
@@ -507,7 +507,9 @@
 	
 	if (draw_grid) {
 		// draw the dot of the grid
-		p -> setPen(Qt::black);
+		QPen pen(Qt::black);
+		pen.setCosmetic(true);
+		p -> setPen(pen);
 		p -> setBrush(Qt::NoBrush);
 		qreal limite_x = r.x() + r.width();
 		qreal limite_y = r.y() + r.height();


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/