CreateDialogCodeDialog: added code to cope with dark backgrounds.

Fri, 03 Apr 2020 18:17:57 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Fri, 03 Apr 2020 18:17:57 +0200
changeset 7494
268c297df637
parent 7493
1696e91a5393
child 7495
c4e7d34f195b

CreateDialogCodeDialog: added code to cope with dark backgrounds.

eric6/Project/CreateDialogCodeDialog.py file | annotate | diff | comparison | revisions
--- a/eric6/Project/CreateDialogCodeDialog.py	Fri Apr 03 17:43:01 2020 +0200
+++ b/eric6/Project/CreateDialogCodeDialog.py	Fri Apr 03 18:17:57 2020 +0200
@@ -16,7 +16,7 @@
     pyqtSlot, Qt, QMetaObject, QRegExp, QSortFilterProxyModel, QProcess,
     QProcessEnvironment
 )
-from PyQt5.QtGui import QStandardItemModel, QBrush, QStandardItem
+from PyQt5.QtGui import QStandardItemModel, QStandardItem, QBrush, QColor
 from PyQt5.QtWidgets import QDialog, QDialogButtonBox
 
 
@@ -338,7 +338,10 @@
                             itm2.setFlags(
                                 Qt.ItemFlags(Qt.ItemIsEnabled))
                             itm2.setCheckState(Qt.Checked)
-                            itm2.setForeground(QBrush(Qt.blue))
+                            if e5App().usesDarkPalette():
+                                itm2.setForeground(QBrush(QColor("#75bfff")))
+                            else:
+                                itm2.setForeground(QBrush(Qt.blue))
                             continue
             
                     itm2.setData(methodDict["pyqt_signature"],

eric ide

mercurial