[qet] [3749] Improve visual of grid point (set cosmetic)

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


Revision: 3749
Author:   blacksun
Date:     2015-02-21 22:24:32 +0100 (Sat, 21 Feb 2015)
Log Message:
-----------
Improve visual of grid point (set cosmetic)

Modified Paths:
--------------
    branches/Qt5/sources/diagram.cpp

Modified: branches/Qt5/sources/diagram.cpp
===================================================================
--- branches/Qt5/sources/diagram.cpp	2015-02-21 21:16:47 UTC (rev 3748)
+++ branches/Qt5/sources/diagram.cpp	2015-02-21 21:24:32 UTC (rev 3749)
@@ -123,12 +123,13 @@
 	p -> drawRect(r);
 	
 	if (draw_grid_) {
-		// dessine les points de la grille
-		// if background color is black, then grid spots shall be white, else they shall be black in color.
-		if (Diagram::background_color == Qt::black)
-			p -> setPen(Qt::white);
-		else
-			p -> setPen(Qt::black);
+			//Draw the point of the grid
+			// if background color is black, then grid spots shall be white, else they shall be black in color.
+		QPen pen;
+		Diagram::background_color == Qt::black? pen.setColor(Qt::white) : pen.setColor(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/