diff -r 17a08bd37c2b -r 4cb7aa43845d PluginProjectDjango.py --- a/PluginProjectDjango.py Sun Feb 16 14:38:21 2020 +0100 +++ b/PluginProjectDjango.py Wed Apr 08 19:58:27 2020 +0200 @@ -28,7 +28,7 @@ author = "Detlev Offenbach <detlev@die-offenbachs.de>" autoactivate = True deactivateable = True -version = "5.2.4" +version = "5.3.0" className = "ProjectDjangoPlugin" packageName = "ProjectDjango" shortDescription = "Project support for Django projects." @@ -79,10 +79,23 @@ @return dictionary containing the relevant data """ + 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" + return { "djangoPage": [ QCoreApplication.translate("ProjectDjangoPlugin", "Django"), - os.path.join("ProjectDjango", "icons", "django.png"), + os.path.join("ProjectDjango", "icons", + "django-{0}".format(iconSuffix)), createDjangoPage, None, None], }