Fixed a severe oversight. release-5.3.1

Thu, 09 Apr 2020 18:36:05 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 09 Apr 2020 18:36:05 +0200
changeset 153
55389b5b105a
parent 152
4af784d62412
child 154
fac8ec3f5902

Fixed a severe oversight.

ChangeLog file | annotate | diff | comparison | revisions
PluginProjectDjango.py file | annotate | diff | comparison | revisions
PluginProjectDjango.zip file | annotate | diff | comparison | revisions
--- a/ChangeLog	Wed Apr 08 20:00:46 2020 +0200
+++ b/ChangeLog	Thu Apr 09 18:36:05 2020 +0200
@@ -1,5 +1,8 @@
 ChangeLog
 ---------
+Version 5.3.1:
+- bug fixes
+
 Version 5.3.0:
 - replaced pixmap icons by vector icons
 
--- a/PluginProjectDjango.py	Wed Apr 08 20:00:46 2020 +0200
+++ b/PluginProjectDjango.py	Thu Apr 09 18:36:05 2020 +0200
@@ -28,7 +28,7 @@
 author = "Detlev Offenbach <detlev@die-offenbachs.de>"
 autoactivate = True
 deactivateable = True
-version = "5.3.0"
+version = "5.3.1"
 className = "ProjectDjangoPlugin"
 packageName = "ProjectDjango"
 shortDescription = "Project support for Django projects."
@@ -195,7 +195,19 @@
         global djangoPluginObject
         djangoPluginObject = self
         
-        self.__object = Project(self, self.__ui)
+        try:
+            usesDarkPalette = e5App().usesDarkPalette()
+        except AttributeError:
+            from PyQt5.QtGui import QPalette
+            palette = e5App().palette()
+            lightness = palette.color(QPalette.Window).lightness()
+            usesDarkPalette = lightness <= 128
+        if usesDarkPalette:
+            iconSuffix = "dark"
+        else:
+            iconSuffix = "light"
+        
+        self.__object = Project(self, iconSuffix, self.__ui)
         self.__object.initActions()
         e5App().registerPluginObject("ProjectDjango", self.__object)
         
Binary file PluginProjectDjango.zip has changed

eric ide

mercurial