PluginProjectDjango.py

changeset 148
4cb7aa43845d
parent 146
8c42fc23c94c
child 153
55389b5b105a
equal deleted inserted replaced
147:17a08bd37c2b 148:4cb7aa43845d
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.2.4" 31 version = "5.3.0"
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."""
77 """ 77 """
78 Module function returning data as required by the configuration dialog. 78 Module function returning data as required by the configuration dialog.
79 79
80 @return dictionary containing the relevant data 80 @return dictionary containing the relevant data
81 """ 81 """
82 try:
83 usesDarkPalette = e5App().usesDarkPalette()
84 except AttributeError:
85 from PyQt5.QtGui import QPalette
86 palette = e5App().palette()
87 lightness = palette.color(QPalette.Window).lightness()
88 usesDarkPalette = lightness <= 128
89 if usesDarkPalette:
90 iconSuffix = "dark"
91 else:
92 iconSuffix = "light"
93
82 return { 94 return {
83 "djangoPage": [ 95 "djangoPage": [
84 QCoreApplication.translate("ProjectDjangoPlugin", "Django"), 96 QCoreApplication.translate("ProjectDjangoPlugin", "Django"),
85 os.path.join("ProjectDjango", "icons", "django.png"), 97 os.path.join("ProjectDjango", "icons",
98 "django-{0}".format(iconSuffix)),
86 createDjangoPage, None, None], 99 createDjangoPage, None, None],
87 } 100 }
88 101
89 102
90 def prepareUninstall(): 103 def prepareUninstall():

eric ide

mercurial