Fixed the grid color usage of the icon editor windows. eric7

Tue, 28 Dec 2021 18:02:43 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 28 Dec 2021 18:02:43 +0100
branch
eric7
changeset 8873
989b31970862
parent 8872
ee64dbfefd5f
child 8874
ccd99849803e

Fixed the grid color usage of the icon editor windows.

eric7/IconEditor/IconEditorGrid.py file | annotate | diff | comparison | revisions
--- a/eric7/IconEditor/IconEditorGrid.py	Tue Dec 28 17:37:03 2021 +0100
+++ b/eric7/IconEditor/IconEditorGrid.py	Tue Dec 28 18:02:43 2021 +0100
@@ -18,6 +18,7 @@
 from PyQt6.QtWidgets import QWidget, QSizePolicy, QApplication, QDialog
 
 from EricWidgets import EricMessageBox
+from EricWidgets.EricApplication import ericApp
 
 
 class IconEditCommand(QUndoCommand):
@@ -429,8 +430,10 @@
         painter = QPainter(self)
         
         if self.__zoom >= 3 and self.__gridEnabled:
-            # TODO: adjust colors
-            painter.setPen(self.palette().windowText().color())
+            if ericApp().usesDarkPalette():
+                painter.setPen(self.palette().window().color())
+            else:
+                painter.setPen(self.palette().windowText().color())
             i = 0
             while i <= self.__image.width():
                 painter.drawLine(

eric ide

mercurial