eric7/IconEditor/IconEditorGrid.py

branch
eric7
changeset 8873
989b31970862
parent 8857
8191d15b8974
child 8881
54e42bc2437a
--- 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