Wed, 08 Apr 2020 19:58:27 +0200
Replaced pixmap icons by vector icons.
--- a/ChangeLog Sun Feb 16 14:38:21 2020 +0100 +++ b/ChangeLog Wed Apr 08 19:58:27 2020 +0200 @@ -1,5 +1,8 @@ ChangeLog --------- +Version 5.3.0: +- replaced pixmap icons by vector icons + Version 5.2.4: - bug fixes
--- a/PKGLIST Sun Feb 16 14:38:21 2020 +0100 +++ b/PKGLIST Wed Apr 08 19:58:27 2020 +0200 @@ -45,6 +45,9 @@ ProjectDjango/i18n/django_en.qm ProjectDjango/i18n/django_es.qm ProjectDjango/i18n/django_ru.qm -ProjectDjango/icons/applied.png -ProjectDjango/icons/django.png -ProjectDjango/icons/django64.png +ProjectDjango/icons/applied-dark.svg +ProjectDjango/icons/applied-light.svg +ProjectDjango/icons/django-dark.svg +ProjectDjango/icons/django-light.svg +ProjectDjango/icons/django64-dark.svg +ProjectDjango/icons/django64-light.svg
--- a/PluginDjango.e4p Sun Feb 16 14:38:21 2020 +0100 +++ b/PluginDjango.e4p Wed Apr 08 19:58:27 2020 +0200 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE Project SYSTEM "Project-5.1.dtd"> <!-- eric project file for project PluginDjango --> -<!-- Copyright (C) 2018 Detlev Offenbach, detlev@die-offenbachs.de --> +<!-- Copyright (C) 2020 Detlev Offenbach, detlev@die-offenbachs.de --> <Project version="5.1"> <Language>en</Language> <Hash>74ebac2e9316db59fdca32e146fa5ae695c66907</Hash> @@ -70,9 +70,12 @@ <Other>ProjectDjango/Documentation/LICENSE.GPL3</Other> <Other>ProjectDjango/Documentation/help</Other> <Other>ProjectDjango/Documentation/source</Other> - <Other>ProjectDjango/icons/applied.png</Other> - <Other>ProjectDjango/icons/django.png</Other> - <Other>ProjectDjango/icons/django64.png</Other> + <Other>ProjectDjango/icons/applied-dark.svg</Other> + <Other>ProjectDjango/icons/applied-light.svg</Other> + <Other>ProjectDjango/icons/django-dark.svg</Other> + <Other>ProjectDjango/icons/django-light.svg</Other> + <Other>ProjectDjango/icons/django64-dark.svg</Other> + <Other>ProjectDjango/icons/django64-light.svg</Other> </Others> <MainScript>PluginProjectDjango.py</MainScript> <Vcs> @@ -255,6 +258,34 @@ <value> <dict> <key> + <string>AnnotationsChecker</string> + </key> + <value> + <dict> + <key> + <string>MaximumComplexity</string> + </key> + <value> + <int>3</int> + </value> + <key> + <string>MinimumCoverage</string> + </key> + <value> + <int>75</int> + </value> + </dict> + </value> + <key> + <string>BlankLines</string> + </key> + <value> + <tuple> + <int>2</int> + <int>1</int> + </tuple> + </value> + <key> <string>BuiltinsChecker</string> </key> <value> @@ -286,6 +317,19 @@ </dict> </value> <key> + <string>CommentedCodeChecker</string> + </key> + <value> + <dict> + <key> + <string>Aggressive</string> + </key> + <value> + <bool>False</bool> + </value> + </dict> + </value> + <key> <string>CopyrightAuthor</string> </key> <value> @@ -313,7 +357,7 @@ <string>ExcludeMessages</string> </key> <value> - <string>C101, E265, E266, E305, E402, M811, N802, N803, N807, N808, N821, W293, M201</string> + <string>A, C101, E265, E266, E305, E402, M201, M301, M302, M303, M304, M305, M306, M307, M308, M311, M312, M313, M314, M315, M321, M701, M702, M811, M834, N802, N803, N807, N808, N821, W293, W504</string> </value> <key> <string>FixCodes</string> @@ -364,6 +408,12 @@ <int>10</int> </value> <key> + <string>MaxDocLineLength</string> + </key> + <value> + <int>79</int> + </value> + <key> <string>MaxLineLength</string> </key> <value>
--- 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], }
--- a/ProjectDjango/ConfigurationPage/DjangoPage.py Sun Feb 16 14:38:21 2020 +0100 +++ b/ProjectDjango/ConfigurationPage/DjangoPage.py Wed Apr 08 19:58:27 2020 +0200 @@ -39,9 +39,9 @@ self.setupUi(self) self.setObjectName("DjangoPage") - self.virtualEnvPy3Button.setIcon(UI.PixmapCache.getIcon("open.png")) - self.virtualEnvPy2Button.setIcon(UI.PixmapCache.getIcon("open.png")) - self.translationsButton.setIcon(UI.PixmapCache.getIcon("open.png")) + self.virtualEnvPy3Button.setIcon(UI.PixmapCache.getIcon("open")) + self.virtualEnvPy2Button.setIcon(UI.PixmapCache.getIcon("open")) + self.translationsButton.setIcon(UI.PixmapCache.getIcon("open")) self.__virtualEnvPy3Completer = E5DirCompleter(self.virtualEnvPy3Edit) self.__virtualEnvPy2Completer = E5DirCompleter(self.virtualEnvPy2Edit)
--- a/ProjectDjango/DjangoCheckOptionsDialog.py Sun Feb 16 14:38:21 2020 +0100 +++ b/ProjectDjango/DjangoCheckOptionsDialog.py Wed Apr 08 19:58:27 2020 +0200 @@ -49,7 +49,7 @@ super(DjangoCheckOptionsDialog, self).__init__(parent) self.setupUi(self) - self.settingsFileButton.setIcon(UI.PixmapCache.getIcon("open.png")) + self.settingsFileButton.setIcon(UI.PixmapCache.getIcon("open")) self.__python = python self.__path = path
--- a/ProjectDjango/DjangoLoaddataDataDialog.py Sun Feb 16 14:38:21 2020 +0100 +++ b/ProjectDjango/DjangoLoaddataDataDialog.py Wed Apr 08 19:58:27 2020 +0200 @@ -34,7 +34,7 @@ super(DjangoLoaddataDataDialog, self).__init__(parent) self.setupUi(self) - self.fixtureFileButton.setIcon(UI.PixmapCache.getIcon("open.png")) + self.fixtureFileButton.setIcon(UI.PixmapCache.getIcon("open")) self.__project = project
--- a/ProjectDjango/DjangoMigrationSelectionDialog.py Sun Feb 16 14:38:21 2020 +0100 +++ b/ProjectDjango/DjangoMigrationSelectionDialog.py Wed Apr 08 19:58:27 2020 +0200 @@ -24,7 +24,8 @@ """ Class implementing a dialog to select an application and migration. """ - def __init__(self, migrations, migrationRequired=False, parent=None): + def __init__(self, migrations, migrationRequired=False, suffix="", + parent=None): """ Constructor @@ -33,6 +34,8 @@ @param migrationRequired flag indicating that a migration must be selected @type bool + @param suffix icon suffix + @type str @param parent reference to the parent widget @type QWidget """ @@ -40,7 +43,8 @@ self.setupUi(self) self.__appliedIcon = QIcon(os.path.join( - os.path.dirname(__file__), "icons", "applied.png")) + os.path.dirname(__file__), "icons", "applied-{0}".format(suffix) + )) self.__migrationRequired = migrationRequired
--- a/ProjectDjango/DjangoRunTestServerDataDialog.py Sun Feb 16 14:38:21 2020 +0100 +++ b/ProjectDjango/DjangoRunTestServerDataDialog.py Wed Apr 08 19:58:27 2020 +0200 @@ -34,7 +34,7 @@ super(DjangoRunTestServerDataDialog, self).__init__(parent) self.setupUi(self) - self.fixtureFileButton.setIcon(UI.PixmapCache.getIcon("open.png")) + self.fixtureFileButton.setIcon(UI.PixmapCache.getIcon("open")) self.__project = project
--- a/ProjectDjango/DjangoSquashMigrationSelectionDialog.py Sun Feb 16 14:38:21 2020 +0100 +++ b/ProjectDjango/DjangoSquashMigrationSelectionDialog.py Wed Apr 08 19:58:27 2020 +0200 @@ -24,7 +24,7 @@ """ Class implementing a dialog to enter data needed to squash migrations. """ - def __init__(self, migrations, django, parent=None): + def __init__(self, migrations, django, suffix, parent=None): """ Constructor @@ -32,6 +32,8 @@ @type dict @param django reference to the Django project object @type Project + @param suffix icon suffix + @type str @param parent reference to the parent widget @type QWidget """ @@ -39,7 +41,8 @@ self.setupUi(self) self.__appliedIcon = QIcon(os.path.join( - os.path.dirname(__file__), "icons", "applied.png")) + os.path.dirname(__file__), "icons", "applied-{0}".format(suffix) + )) self.__version = django.getDjangoVersion() self.startMigrationComboBox.setEnabled(self.__version >= (1, 9, 0))
--- a/ProjectDjango/Project.py Sun Feb 16 14:38:21 2020 +0100 +++ b/ProjectDjango/Project.py Wed Apr 08 19:58:27 2020 +0200 @@ -99,17 +99,23 @@ RecentApplicationsKey = "Django/RecentApplications" RecentDatabaseNamesKey = "Django/RecentDatabaseNames" - def __init__(self, plugin, parent=None): + def __init__(self, plugin, iconSuffix, parent=None): """ Constructor @param plugin reference to the plugin object - @param parent parent (QObject) + @type ProjectDjangoPlugin + @param iconSuffix suffix for the icons + @type str + @param parent parent + @type QObject """ super(Project, self).__init__(parent) self.__plugin = plugin + self.__iconSuffix = iconSuffix self.__ui = parent + self.__e5project = e5App().getObject("Project") try: self.__virtualEnvManager = e5App().getObject("VirtualEnvManager") @@ -1594,7 +1600,8 @@ modal=True, buttons=E5MessageBox.Ok) msgBox.setIconPixmap(UI.PixmapCache.getPixmap( - os.path.join("ProjectDjango", "icons", "django64.png"))) + os.path.join("ProjectDjango", "icons", + "django64-{0}".format(self.__iconSuffix)))) msgBox.exec_() def getDjangoVersionString(self): @@ -2561,7 +2568,8 @@ from .DjangoMigrationSelectionDialog import \ DjangoMigrationSelectionDialog dlg = DjangoMigrationSelectionDialog(migrations, - migrationRequired=True) + migrationRequired=True, + suffix=self.__iconSuffix) if dlg.exec_() == QDialog.Accepted: app, migration = dlg.getData() @@ -2640,7 +2648,8 @@ from .DjangoMigrationSelectionDialog import \ DjangoMigrationSelectionDialog - dlg = DjangoMigrationSelectionDialog(migrations) + dlg = DjangoMigrationSelectionDialog(migrations, + suffix=self.__iconSuffix) if dlg.exec_() == QDialog.Accepted: app, migration = dlg.getData() self.applyMigrations(app=app, migration=migration) @@ -2818,7 +2827,7 @@ from .DjangoSquashMigrationSelectionDialog import \ DjangoSquashMigrationSelectionDialog dlg = DjangoSquashMigrationSelectionDialog( - migrations, self) + migrations, self, self.__iconSuffix) if dlg.exec_() == QDialog.Accepted: app, start, end, noOptimize, name = dlg.getData()
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ProjectDjango/icons/applied-dark.svg Wed Apr 08 19:58:27 2020 +0200 @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg version="1.1" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg"> + <defs> + <style type="text/css">.ColorScheme-Text { + color:#eff0f1; + }</style> + </defs> + <path class="ColorScheme-Text" d="m20.116 3.5-13.048 13.208-5.1837-5.2472-0.8839 0.89472 5.1837 5.2471-0.0025 0.0025 0.88391 0.89471 0.0025-0.0025 0.0025 0.0025 0.88389-0.89471-0.0025-0.0025 13.048-13.208-0.8839-0.8947z" color="#eff0f1" fill="currentColor"/> +</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ProjectDjango/icons/applied-light.svg Wed Apr 08 19:58:27 2020 +0200 @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg version="1.1" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg"> + <defs> + <style type="text/css">.ColorScheme-Text { + color:#eff0f1; + }</style> + </defs> + <path class="ColorScheme-Text" d="m20.116 3.5-13.048 13.208-5.1837-5.2472-0.8839 0.89472 5.1837 5.2471-0.0025 0.0025 0.88391 0.89471 0.0025-0.0025 0.0025 0.0025 0.88389-0.89471-0.0025-0.0025 13.048-13.208-0.8839-0.8947z" color="#eff0f1" fill="#232629"/> +</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ProjectDjango/icons/django-dark.svg Wed Apr 08 19:58:27 2020 +0200 @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg width="22" height="22" enable-background="new 0 0 1000 1000" version="1.1" viewBox="0 0 22 22" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"> + +<g transform="matrix(.021036 0 0 .020408 .48199 .79592)" fill="#eff0f1"><g fill="#eff0f1"><path d="m625.4 10h-160.3v244.3c-23.9-6.2-43.7-8.3-69.7-8.3-167.5 0-275.7 106.1-275.7 269.5 0 169.6 102 258.1 297.6 258.1 65.5 0 125.9-6.2 208.1-21.8zm-160.3 630.4c-22.9 3.1-37.5 4.1-55.1 4.1-82.2 0-127-46.8-127-132.1 0-87.4 46.9-137.4 128-137.4 19.8 0 35.4 2.1 54.1 8.3zm415.2-629.5v164.4h-160.2v-164.4zm-160.2 246.6h160.2v371.5c0 128-9.4 189.4-37.5 242.4-26 51-60.3 83.2-131.1 118.6l-148.8-70.8c70.7-33.3 105.1-62.4 127-107.2 22.9-45.8 30.2-98.9 30.2-238.3z" fill="#eff0f1"/></g></g> +</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ProjectDjango/icons/django-light.svg Wed Apr 08 19:58:27 2020 +0200 @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg width="22" height="22" enable-background="new 0 0 1000 1000" version="1.1" viewBox="0 0 22 22" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"> + +<g transform="matrix(.021036 0 0 .020408 .48199 .79592)" fill="#232629"><g fill="#232629"><path d="m625.4 10h-160.3v244.3c-23.9-6.2-43.7-8.3-69.7-8.3-167.5 0-275.7 106.1-275.7 269.5 0 169.6 102 258.1 297.6 258.1 65.5 0 125.9-6.2 208.1-21.8zm-160.3 630.4c-22.9 3.1-37.5 4.1-55.1 4.1-82.2 0-127-46.8-127-132.1 0-87.4 46.9-137.4 128-137.4 19.8 0 35.4 2.1 54.1 8.3zm415.2-629.5v164.4h-160.2v-164.4zm-160.2 246.6h160.2v371.5c0 128-9.4 189.4-37.5 242.4-26 51-60.3 83.2-131.1 118.6l-148.8-70.8c70.7-33.3 105.1-62.4 127-107.2 22.9-45.8 30.2-98.9 30.2-238.3z" fill="#232629"/></g></g> +</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ProjectDjango/icons/django64-dark.svg Wed Apr 08 19:58:27 2020 +0200 @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg width="64" height="64" enable-background="new 0 0 1000 1000" version="1.1" viewBox="0 0 64 64" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"> + +<g transform="matrix(.065738 0 0 .065306 -.86879 -.65306)" fill="#eff0f1"><g fill="#eff0f1"><path d="m625.4 10h-160.3v244.3c-23.9-6.2-43.7-8.3-69.7-8.3-167.5 0-275.7 106.1-275.7 269.5 0 169.6 102 258.1 297.6 258.1 65.5 0 125.9-6.2 208.1-21.8zm-160.3 630.4c-22.9 3.1-37.5 4.1-55.1 4.1-82.2 0-127-46.8-127-132.1 0-87.4 46.9-137.4 128-137.4 19.8 0 35.4 2.1 54.1 8.3zm415.2-629.5v164.4h-160.2v-164.4zm-160.2 246.6h160.2v371.5c0 128-9.4 189.4-37.5 242.4-26 51-60.3 83.2-131.1 118.6l-148.8-70.8c70.7-33.3 105.1-62.4 127-107.2 22.9-45.8 30.2-98.9 30.2-238.3z" fill="#eff0f1"/></g></g> +</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ProjectDjango/icons/django64-light.svg Wed Apr 08 19:58:27 2020 +0200 @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg width="64" height="64" enable-background="new 0 0 1000 1000" version="1.1" viewBox="0 0 64 64" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"> + +<g transform="matrix(.065738 0 0 .065306 -.86879 -.65306)" fill="#232629"><g fill="#232629"><path d="m625.4 10h-160.3v244.3c-23.9-6.2-43.7-8.3-69.7-8.3-167.5 0-275.7 106.1-275.7 269.5 0 169.6 102 258.1 297.6 258.1 65.5 0 125.9-6.2 208.1-21.8zm-160.3 630.4c-22.9 3.1-37.5 4.1-55.1 4.1-82.2 0-127-46.8-127-132.1 0-87.4 46.9-137.4 128-137.4 19.8 0 35.4 2.1 54.1 8.3zm415.2-629.5v164.4h-160.2v-164.4zm-160.2 246.6h160.2v371.5c0 128-9.4 189.4-37.5 242.4-26 51-60.3 83.2-131.1 118.6l-148.8-70.8c70.7-33.3 105.1-62.4 127-107.2 22.9-45.8 30.2-98.9 30.2-238.3z" fill="#232629"/></g></g> +</svg>