Wed, 08 Apr 2020 19:22:13 +0200
Replaced pixmap icons by vector icons.
--- a/ChangeLog Wed Jan 01 11:59:04 2020 +0100 +++ b/ChangeLog Wed Apr 08 19:22:13 2020 +0200 @@ -1,5 +1,8 @@ ChangeLog --------- +Version 2.2.0: +- replaced pixmap icons by vector icons + Version 2.1.4: - bug fixes
--- a/PKGLIST Wed Jan 01 11:59:04 2020 +0100 +++ b/PKGLIST Wed Apr 08 19:22:13 2020 +0200 @@ -10,7 +10,11 @@ SelectionEncloser/i18n/selectionencloser_en.qm SelectionEncloser/i18n/selectionencloser_es.qm SelectionEncloser/i18n/selectionencloser_ru.qm -SelectionEncloser/icons/edit.png -SelectionEncloser/icons/selectionEncloser.png -SelectionEncloser/icons/separatorAdd.png -SelectionEncloser/icons/topAdd.png +SelectionEncloser/icons/edit-dark.svg +SelectionEncloser/icons/edit-light.svg +SelectionEncloser/icons/selectionEncloser-dark.svg +SelectionEncloser/icons/selectionEncloser-light.svg +SelectionEncloser/icons/separatorAdd-dark.svg +SelectionEncloser/icons/separatorAdd-light.svg +SelectionEncloser/icons/topAdd-dark.svg +SelectionEncloser/icons/topAdd-light.svg
--- a/PluginSelectionEncloser.py Wed Jan 01 11:59:04 2020 +0100 +++ b/PluginSelectionEncloser.py Wed Apr 08 19:22:13 2020 +0200 @@ -24,7 +24,7 @@ author = "Detlev Offenbach <detlev@die-offenbachs.de>" autoactivate = True deactivateable = True -version = "2.1.4" +version = "2.2.0" className = "SelectionEncloserPlugin" packageName = "SelectionEncloser" shortDescription = "Enclose the selection with a string." @@ -62,12 +62,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 { "selectionEncloserPage": [ QCoreApplication.translate("SelectionEncloserPlugin", "Selection Encloser"), os.path.join("SelectionEncloser", "icons", - "selectionEncloser.png"), + "selectionEncloser-{0}".format(iconSuffix)), createSelectionEncloserPage, None, None], }
--- a/SelectionEncloser.e4p Wed Jan 01 11:59:04 2020 +0100 +++ b/SelectionEncloser.e4p Wed Apr 08 19:22:13 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 SelectionEncloser --> -<!-- 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>91f365d0cd272c85920259a5767cf6213841f57c</Hash> @@ -34,8 +34,6 @@ <Translation>SelectionEncloser/i18n/selectionencloser_ru.qm</Translation> <Translation>SelectionEncloser/i18n/selectionencloser_ru.ts</Translation> </Translations> - <Resources/> - <Interfaces/> <Others> <Other>.hgignore</Other> <Other>ChangeLog</Other> @@ -44,10 +42,14 @@ <Other>SelectionEncloser.e4p</Other> <Other>SelectionEncloser/Documentation/LICENSE.GPL3</Other> <Other>SelectionEncloser/Documentation/source</Other> - <Other>SelectionEncloser/icons/edit.png</Other> - <Other>SelectionEncloser/icons/selectionEncloser.png</Other> - <Other>SelectionEncloser/icons/separatorAdd.png</Other> - <Other>SelectionEncloser/icons/topAdd.png</Other> + <Other>SelectionEncloser/icons/edit-dark.svg</Other> + <Other>SelectionEncloser/icons/edit-light.svg</Other> + <Other>SelectionEncloser/icons/selectionEncloser-dark.svg</Other> + <Other>SelectionEncloser/icons/selectionEncloser-light.svg</Other> + <Other>SelectionEncloser/icons/separatorAdd-dark.svg</Other> + <Other>SelectionEncloser/icons/separatorAdd-light.svg</Other> + <Other>SelectionEncloser/icons/topAdd-dark.svg</Other> + <Other>SelectionEncloser/icons/topAdd-light.svg</Other> </Others> <MainScript>PluginSelectionEncloser.py</MainScript> <Vcs>
--- a/SelectionEncloser/ConfigurationPage/SelectionEncloserPage.py Wed Jan 01 11:59:04 2020 +0100 +++ b/SelectionEncloser/ConfigurationPage/SelectionEncloserPage.py Wed Apr 08 19:22:13 2020 +0200 @@ -14,6 +14,8 @@ from PyQt5.QtCore import pyqtSlot, Qt from PyQt5.QtWidgets import QTreeWidgetItem, QInputDialog, QLineEdit, QDialog +from E5Gui.E5Application import e5App + from Preferences.ConfigurationPages.ConfigurationPageBase import \ ConfigurationPageBase from .Ui_SelectionEncloserPage import Ui_SelectionEncloserPage @@ -35,16 +37,31 @@ self.setupUi(self) self.setObjectName("SelectionEncloserPage") + 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("SelectionEncloser", "icons", "edit.png"))) - self.addButton.setIcon(UI.PixmapCache.getIcon("plus.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("SelectionEncloser", "icons", + "edit-{0}".format(iconSuffix)))) + self.addButton.setIcon(UI.PixmapCache.getIcon("plus")) + self.deleteButton.setIcon(UI.PixmapCache.getIcon("minus")) + self.upButton.setIcon(UI.PixmapCache.getIcon("1uparrow")) + self.downButton.setIcon(UI.PixmapCache.getIcon("1downarrow")) self.addMenuButton.setIcon(UI.PixmapCache.getIcon( - os.path.join("SelectionEncloser", "icons", "topAdd.png"))) + os.path.join("SelectionEncloser", "icons", + "topAdd-{0}".format(iconSuffix)))) self.addSeparatorButton.setIcon(UI.PixmapCache.getIcon( - os.path.join("SelectionEncloser", "icons", "separatorAdd.png"))) + os.path.join("SelectionEncloser", "icons", + "separatorAdd-{0}".format(iconSuffix)))) self.editButton.setEnabled(False) self.addButton.setEnabled(False)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SelectionEncloser/icons/edit-dark.svg Wed Apr 08 19:22:13 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/SelectionEncloser/icons/edit-light.svg Wed Apr 08 19:22:13 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/SelectionEncloser/icons/selectionEncloser-dark.svg Wed Apr 08 19:22:13 2020 +0200 @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg width="22" height="22" version="1.1" viewBox="0 0 352 352" xmlns="http://www.w3.org/2000/svg"> + <defs> + <style type="text/css">.ColorScheme-Text { + color:#eff0f1; + }</style> + </defs> + <path d="m293.33 240v-42.667h42.667v-42.667h-42.667v-42.667l-85.333 64 85.333 64" fill="#eff0f1" stroke-width=".66667"/> + <path d="m58.667 240v-42.667h-42.667v-42.667h42.667v-42.667l85.333 64-85.333 64" fill="#eff0f1" stroke-width=".66667"/> +</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SelectionEncloser/icons/selectionEncloser-light.svg Wed Apr 08 19:22:13 2020 +0200 @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg width="22" height="22" version="1.1" viewBox="0 0 352 352" xmlns="http://www.w3.org/2000/svg"> + <defs> + <style type="text/css">.ColorScheme-Text { + color:#eff0f1; + }</style> + </defs> + <path d="m293.33 240v-42.667h42.667v-42.667h-42.667v-42.667l-85.333 64 85.333 64" fill="#232629" stroke-width=".66667"/> + <path d="m58.667 240v-42.667h-42.667v-42.667h42.667v-42.667l85.333 64-85.333 64" fill="#232629" stroke-width=".66667"/> +</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SelectionEncloser/icons/separatorAdd-dark.svg Wed Apr 08 19:22:13 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/SelectionEncloser/icons/separatorAdd-light.svg Wed Apr 08 19:22:13 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>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SelectionEncloser/icons/topAdd-dark.svg Wed Apr 08 19:22:13 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 d="m10.333 1v9.3333h-9.3333v1.3333h9.3333v9.3333h1.3333v-9.3333h9.3333v-1.3333h-9.3333v-9.3333z" color="#eff0f1" fill="currentColor" stroke="#eff0f1"/> +</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SelectionEncloser/icons/topAdd-light.svg Wed Apr 08 19:22:13 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 d="m10.333 1v9.3333h-9.3333v1.3333h9.3333v9.3333h1.3333v-9.3333h9.3333v-1.3333h-9.3333v-9.3333z" color="#eff0f1" fill="#232629" stroke="#232629"/> +</svg>