Wed, 08 Apr 2020 19:33:16 +0200
Replaced pixmap icons by vector icons.
--- a/ChangeLog Wed Jan 01 11:59:03 2020 +0100 +++ b/ChangeLog Wed Apr 08 19:33:16 2020 +0200 @@ -1,5 +1,8 @@ ChangeLog --------- +Version 2.2.0: +- replaced pixmap icons by vector icons + Version 2.1.2: - bug fixes
--- a/PKGLIST Wed Jan 01 11:59:03 2020 +0100 +++ b/PKGLIST Wed Apr 08 19:33:16 2020 +0200 @@ -9,6 +9,9 @@ PrintRemover/i18n/printremover_es.qm PrintRemover/i18n/printremover_pt.qm PrintRemover/i18n/printremover_ru.qm -PrintRemover/icons/edit.png -PrintRemover/icons/printRemover.png -PrintRemover/icons/separatorAdd.png +PrintRemover/icons/edit-dark.svg +PrintRemover/icons/edit-light.svg +PrintRemover/icons/printRemover-dark.svg +PrintRemover/icons/printRemover-light.svg +PrintRemover/icons/separatorAdd-dark.svg +PrintRemover/icons/separatorAdd-light.svg
--- a/PluginPrintRemover.py Wed Jan 01 11:59:03 2020 +0100 +++ b/PluginPrintRemover.py Wed Apr 08 19:33:16 2020 +0200 @@ -23,7 +23,7 @@ author = "Detlev Offenbach <detlev@die-offenbachs.de>" autoactivate = True deactivateable = True -version = "2.1.2" +version = "2.2.0" className = "PrintRemoverPlugin" packageName = "PrintRemover" shortDescription = "Remove print() like debug statements." @@ -63,11 +63,24 @@ @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 { "printRemoverPage": [ QCoreApplication.translate("PrintRemoverPlugin", "Print Remover"), - os.path.join("PrintRemover", "icons", "printRemover.png"), + os.path.join("PrintRemover", "icons", + "printRemover-{0}".format(iconSuffix)), createPrintRemoverPage, None, None], }
--- a/PrintRemover.e4p Wed Jan 01 11:59:03 2020 +0100 +++ b/PrintRemover.e4p Wed Apr 08 19:33:16 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 PrintRemover --> -<!-- Copyright (C) 2017 Detlev Offenbach, detlev@die-offenbachs.de --> +<!-- Copyright (C) 2020 Detlev Offenbach, detlev@die-offenbachs.de --> <Project version="5.1"> <Language>en_US</Language> <Hash>d994091d1e81ad5afcdcbc00ecea86f23163c696</Hash> @@ -35,8 +35,6 @@ <Translation>PrintRemover/i18n/printremover_ru.qm</Translation> <Translation>PrintRemover/i18n/printremover_ru.ts</Translation> </Translations> - <Resources/> - <Interfaces/> <Others> <Other>.hgignore</Other> <Other>ChangeLog</Other> @@ -45,9 +43,12 @@ <Other>PrintRemover.e4p</Other> <Other>PrintRemover/Documentation/LICENSE.GPL3</Other> <Other>PrintRemover/Documentation/source</Other> - <Other>PrintRemover/icons/edit.png</Other> - <Other>PrintRemover/icons/printRemover.png</Other> - <Other>PrintRemover/icons/separatorAdd.png</Other> + <Other>PrintRemover/icons/edit-dark.svg</Other> + <Other>PrintRemover/icons/edit-light.svg</Other> + <Other>PrintRemover/icons/printRemover-dark.svg</Other> + <Other>PrintRemover/icons/printRemover-light.svg</Other> + <Other>PrintRemover/icons/separatorAdd-dark.svg</Other> + <Other>PrintRemover/icons/separatorAdd-light.svg</Other> </Others> <MainScript>PluginPrintRemover.py</MainScript> <Vcs>
--- a/PrintRemover/ConfigurationPage/PrintRemoverPage.py Wed Jan 01 11:59:03 2020 +0100 +++ b/PrintRemover/ConfigurationPage/PrintRemoverPage.py Wed Apr 08 19:33:16 2020 +0200 @@ -14,6 +14,8 @@ from PyQt5.QtCore import pyqtSlot from PyQt5.QtWidgets import QListWidgetItem, QInputDialog, QLineEdit +from E5Gui.E5Application import e5App + from Preferences.ConfigurationPages.ConfigurationPageBase import \ ConfigurationPageBase from .Ui_PrintRemoverPage import Ui_PrintRemoverPage @@ -35,14 +37,28 @@ self.setupUi(self) self.setObjectName("PrintRemoverPage") + 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.editButton.setIcon(UI.PixmapCache.getIcon( - os.path.join("PrintRemover", "icons", "edit.png"))) - self.addButton.setIcon(UI.PixmapCache.getIcon("plus.png")) + os.path.join("PrintRemover", "icons", + "edit-{0}".format(iconSuffix)))) + self.addButton.setIcon(UI.PixmapCache.getIcon("plus")) self.addSeparatorButton.setIcon(UI.PixmapCache.getIcon( - os.path.join("PrintRemover", "icons", "separatorAdd.png"))) - self.deleteButton.setIcon(UI.PixmapCache.getIcon("minus.png")) - self.upButton.setIcon(UI.PixmapCache.getIcon("1uparrow.png")) - self.downButton.setIcon(UI.PixmapCache.getIcon("1downarrow.png")) + os.path.join("PrintRemover", "icons", + "separatorAdd-{0}".format(iconSuffix)))) + self.deleteButton.setIcon(UI.PixmapCache.getIcon("minus")) + self.upButton.setIcon(UI.PixmapCache.getIcon("1uparrow")) + self.downButton.setIcon(UI.PixmapCache.getIcon("1downarrow")) self.editButton.setEnabled(False) self.deleteButton.setEnabled(False)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/PrintRemover/icons/edit-dark.svg Wed Apr 08 19:33:16 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="m15.995 1-14.99 14.99h-0.0048825v5.0098h5.0098v-0.0049l14.99-14.99-0.0025-0.0024375 0.0025-0.0024375-5-5-0.0025 0.00244-0.0025-0.00244m-2.4976 4.2651 3.2373 3.2373-9.4849 9.4849v-1.9873h-2.5v-1.9873l8.7476-8.7476m-9.9976 9.9976v1.9873h2.5v1.9873l-0.51258 0.51268h-1.9873l-1.25-1.25v-1.9873l1.25-1.25" color="#eff0f1" fill="currentColor"/> +</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/PrintRemover/icons/edit-light.svg Wed Apr 08 19:33:16 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="m15.995 1-14.99 14.99h-0.0048825v5.0098h5.0098v-0.0049l14.99-14.99-0.0025-0.0024375 0.0025-0.0024375-5-5-0.0025 0.00244-0.0025-0.00244m-2.4976 4.2651 3.2373 3.2373-9.4849 9.4849v-1.9873h-2.5v-1.9873l8.7476-8.7476m-9.9976 9.9976v1.9873h2.5v1.9873l-0.51258 0.51268h-1.9873l-1.25-1.25v-1.9873l1.25-1.25" color="#eff0f1" fill="#232629"/> +</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/PrintRemover/icons/printRemover-dark.svg Wed Apr 08 19:33:16 2020 +0200 @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg width="22" height="22" 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="m3.5 1v6.25h-2.5v10h5v3.75h10v-3.75h5v-10h-2.5v-6.25h-15m1.25 1.25h12.5v5h-1.25v-1.25h-10v1.25h-1.25v-5m1.25 1.25v1.25h10v-1.25h-10m-3.75 5h17.5v7.5h-2.5v-2.5h-12.5v2.5h-2.5v-7.5m12.5 1.25v1.25h3.75v-1.25h-3.75m-7.5 7.5h7.5v2.5h-7.5v-2.5" color="#eff0f1" fill="#f55"/> +</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/PrintRemover/icons/printRemover-light.svg Wed Apr 08 19:33:16 2020 +0200 @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg width="22" height="22" 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="m3.5 1v6.25h-2.5v10h5v3.75h10v-3.75h5v-10h-2.5v-6.25h-15m1.25 1.25h12.5v5h-1.25v-1.25h-10v1.25h-1.25v-5m1.25 1.25v1.25h10v-1.25h-10m-3.75 5h17.5v7.5h-2.5v-2.5h-12.5v2.5h-2.5v-7.5m12.5 1.25v1.25h3.75v-1.25h-3.75m-7.5 7.5h7.5v2.5h-7.5v-2.5" color="#eff0f1" fill="#ce0000"/> +</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/PrintRemover/icons/separatorAdd-dark.svg Wed Apr 08 19:33:16 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="m1 9.5h20v3h-20z" color="#eff0f1" fill="currentColor"/> +</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/PrintRemover/icons/separatorAdd-light.svg Wed Apr 08 19:33:16 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="m1 9.5h20v3h-20z" color="#eff0f1" fill="#232629"/> +</svg>