26 # Start-of-Header |
26 # Start-of-Header |
27 name = "Django Project Plugin" |
27 name = "Django Project Plugin" |
28 author = "Detlev Offenbach <detlev@die-offenbachs.de>" |
28 author = "Detlev Offenbach <detlev@die-offenbachs.de>" |
29 autoactivate = True |
29 autoactivate = True |
30 deactivateable = True |
30 deactivateable = True |
31 version = "5.3.0" |
31 version = "5.3.1" |
32 className = "ProjectDjangoPlugin" |
32 className = "ProjectDjangoPlugin" |
33 packageName = "ProjectDjango" |
33 packageName = "ProjectDjango" |
34 shortDescription = "Project support for Django projects." |
34 shortDescription = "Project support for Django projects." |
35 longDescription = \ |
35 longDescription = \ |
36 """This plugin implements project support for Django projects.""" |
36 """This plugin implements project support for Django projects.""" |
193 @return tuple of None and activation status (boolean) |
193 @return tuple of None and activation status (boolean) |
194 """ |
194 """ |
195 global djangoPluginObject |
195 global djangoPluginObject |
196 djangoPluginObject = self |
196 djangoPluginObject = self |
197 |
197 |
198 self.__object = Project(self, self.__ui) |
198 try: |
|
199 usesDarkPalette = e5App().usesDarkPalette() |
|
200 except AttributeError: |
|
201 from PyQt5.QtGui import QPalette |
|
202 palette = e5App().palette() |
|
203 lightness = palette.color(QPalette.Window).lightness() |
|
204 usesDarkPalette = lightness <= 128 |
|
205 if usesDarkPalette: |
|
206 iconSuffix = "dark" |
|
207 else: |
|
208 iconSuffix = "light" |
|
209 |
|
210 self.__object = Project(self, iconSuffix, self.__ui) |
199 self.__object.initActions() |
211 self.__object.initActions() |
200 e5App().registerPluginObject("ProjectDjango", self.__object) |
212 e5App().registerPluginObject("ProjectDjango", self.__object) |
201 |
213 |
202 self.__mainMenu = self.__object.initMenu() |
214 self.__mainMenu = self.__object.initMenu() |
203 |
215 |