Changed icon editor background to a checker-board.

Mon, 06 Sep 2010 16:32:34 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 06 Sep 2010 16:32:34 +0200
changeset 572
5dced3700b78
parent 571
1a4101cb87eb
child 573
3fd49348ea83

Changed icon editor background to a checker-board.

Documentation/Help/source.qch file | annotate | diff | comparison | revisions
IconEditor/IconEditorGrid.py file | annotate | diff | comparison | revisions
Binary file Documentation/Help/source.qch has changed
--- a/IconEditor/IconEditorGrid.py	Sun Sep 05 18:34:37 2010 +0200
+++ b/IconEditor/IconEditorGrid.py	Mon Sep 06 16:32:34 2010 +0200
@@ -375,7 +375,7 @@
         painter = QPainter(self)
         
         if self.__zoom >= 3 and self.__gridEnabled:
-            painter.setPen(self.palette().foreground().color())
+            painter.setPen(self.palette().windowText().color())
             i = 0
             while i <= self.__image.width():
                 painter.drawLine(self.__zoom * i, 0, 
@@ -387,6 +387,7 @@
                                  self.__zoom * self.__image.width(), self.__zoom * j)
                 j += 1
         
+        col = QColor("#aaa")
         painter.setPen(Qt.DashLine)
         for i in range(0, self.__image.width()):
             for j in range(0, self.__image.height()):
@@ -394,7 +395,8 @@
                 if evt.region().intersects(rect):
                     color = QColor.fromRgba(self.__image.pixel(i, j))
                     painter.fillRect(rect, QBrush(Qt.white))
-                    painter.fillRect(rect, QBrush(Qt.Dense5Pattern))
+                    painter.fillRect(QRect(rect.topLeft(), rect.center()), col)
+                    painter.fillRect(QRect(rect.center(), rect.bottomRight()), col)
                     painter.fillRect(rect, QBrush(color))
                 
                     if self.__isMarked(i, j):

eric ide

mercurial