Tue, 07 Apr 2020 19:30:20 +0200
Replaced pixmap icons by vector icons.
--- a/ChangeLog Wed Jan 01 11:58:55 2020 +0100 +++ b/ChangeLog Tue Apr 07 19:30:20 2020 +0200 @@ -1,5 +1,8 @@ ChangeLog --------- +Version 1.2.0: +- replaced pixmap icons by vector icons + Version 1.1.2 - bug fixes
--- a/MqttMonitor/MqttMonitorWidget.py Wed Jan 01 11:58:55 2020 +0100 +++ b/MqttMonitor/MqttMonitorWidget.py Tue Apr 07 19:30:20 2020 +0200 @@ -41,12 +41,14 @@ BrokerStatusTopic = "$SYS/broker/#" BrokerStatusTopicLoadPrefix = "$SYS/broker/load/" - def __init__(self, plugin, parent=None): + def __init__(self, plugin, iconSuffix, parent=None): """ Constructor @param plugin reference to the plug-in object @type MqttMonitorPlugin + @param iconSuffix suffix for the icons + @type str @param parent reference to the parent widget @type QWidget """ @@ -54,12 +56,15 @@ self.setupUi(self) self.__plugin = plugin + self.__iconSuffix = iconSuffix self.__connectedToBroker = False self.__brokerStatusTopicSubscribed = False self.pixmapLabel.setPixmap(UI.PixmapCache.getPixmap( - os.path.join("MqttMonitor", "icons", "mqtt48.png"))) + os.path.join("MqttMonitor", "icons", + "mqtt48-{0}".format(self.__iconSuffix)) + )) self.publishPayloadFilePicker.setMode(E5PathPickerModes.OpenFileMode) self.publishPayloadFilePicker.setFilters(self.tr("All Files (*)")) @@ -115,7 +120,9 @@ self.connectButton.setIcon(UI.PixmapCache.getIcon("ircConnect.png")) self.brokerConnectionOptionsButton.setIcon(UI.PixmapCache.getIcon( - os.path.join("MqttMonitor", "icons", "connectionOptions.png"))) + os.path.join("MqttMonitor", "icons", + "connectionOptions-{0}".format(self.__iconSuffix)) + )) self.__populateBrokerComboBoxes() self.brokerStatusLabel.hide() @@ -987,10 +994,14 @@ self.__connectionModeProfile = profileMode if profileMode: self.modeButton.setIcon(UI.PixmapCache.getIcon( - os.path.join("MqttMonitor", "icons", "profiles.png"))) + os.path.join("MqttMonitor", "icons", + "profiles-{0}".format(self.__iconSuffix)) + )) else: self.modeButton.setIcon(UI.PixmapCache.getIcon( - os.path.join("MqttMonitor", "icons", "quickopen.png"))) + os.path.join("MqttMonitor", "icons", + "quickopen-{0}".format(self.__iconSuffix)) + )) self.profileComboBox.setVisible(profileMode) self.brokerConnectionWidget.setVisible(not profileMode)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MqttMonitor/icons/connectionOptions-dark.svg Tue Apr 07 19:30:20 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="m11.625 1c-1.5173 0-2.7738 1.0699-3.0615 2.5h-7.5635v1.25h7.5635c0.28775 1.4301 1.5442 2.5 3.0615 2.5s2.7738-1.0699 3.0615-2.5h6.3135v-1.25h-6.3135c-0.28775-1.4301-1.5442-2.5-3.0615-2.5zm-7.5 13.75c-1.7313 0-3.125 1.3938-3.125 3.125s1.3937 3.125 3.125 3.125c1.5173 0 2.7738-1.0699 3.0615-2.5h13.813v-1.25h-13.813c-0.28775-1.4301-1.5442-2.5-3.0615-2.5zm0 1.25c1.0388 0 1.875 0.83625 1.875 1.875s-0.83625 1.875-1.875 1.875-1.875-0.83625-1.875-1.875 0.83625-1.875 1.875-1.875z" color="#eff0f1" fill="currentColor"/> +</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MqttMonitor/icons/connectionOptions-light.svg Tue Apr 07 19:30:20 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="m11.625 1c-1.5173 0-2.7738 1.0699-3.0615 2.5h-7.5635v1.25h7.5635c0.28775 1.4301 1.5442 2.5 3.0615 2.5s2.7738-1.0699 3.0615-2.5h6.3135v-1.25h-6.3135c-0.28775-1.4301-1.5442-2.5-3.0615-2.5zm-7.5 13.75c-1.7313 0-3.125 1.3938-3.125 3.125s1.3937 3.125 3.125 3.125c1.5173 0 2.7738-1.0699 3.0615-2.5h13.813v-1.25h-13.813c-0.28775-1.4301-1.5442-2.5-3.0615-2.5zm0 1.25c1.0388 0 1.875 0.83625 1.875 1.875s-0.83625 1.875-1.875 1.875-1.875-0.83625-1.875-1.875 0.83625-1.875 1.875-1.875z" color="#eff0f1" fill="#232629"/> +</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MqttMonitor/icons/mqtt22-dark.svg Tue Apr 07 19:30:20 2020 +0200 @@ -0,0 +1,10 @@ +<?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="m11 3a6.6667 6.8571 0 0 0-6.6667 6.8571 6.6667 6.8571 0 0 0 0.0043403 0.14732 4.4444 4.5714 0 0 0-3.3377 4.4241 4.4444 4.5714 0 0 0 4.4444 4.5714h10a5.5556 5.7143 0 0 0 5.5556-5.7143 5.5556 5.7143 0 0 0-3.6024-5.3437 6.6667 6.8571 0 0 0-6.3976-4.942zm0 1.1429a5.5556 5.7143 0 0 1 5.4666 4.6987 4.4444 4.5714 0 0 1 3.4223 4.4442 4.4444 4.5714 0 0 1-4.4444 4.5714h-10a3.3333 3.4286 0 0 1-3.3333-3.4286 3.3333 3.4286 0 0 1 3.3333-3.4286 3.3333 3.4286 0 0 1 0.11936 0.006696 5.5556 5.7143 0 0 1-0.11936-1.1496 5.5556 5.7143 0 0 1 5.5556-5.7143z" color="#eff0f1" fill="currentColor"/> + <text transform="scale(1.0005 .99951)" x="4.5638237" y="15.247679" fill="#eff0f1" font-family="sans-serif" font-size="4.4715px" letter-spacing="0px" stroke-width=".11179" word-spacing="0px" style="line-height:1.25" xml:space="preserve"><tspan x="4.5638237" y="15.247679" fill="#eff0f1" stroke-width=".11179">MQTT</tspan></text> +</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MqttMonitor/icons/mqtt22-light.svg Tue Apr 07 19:30:20 2020 +0200 @@ -0,0 +1,10 @@ +<?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="m11 3a6.6667 6.8571 0 0 0-6.6667 6.8571 6.6667 6.8571 0 0 0 0.0043403 0.14732 4.4444 4.5714 0 0 0-3.3377 4.4241 4.4444 4.5714 0 0 0 4.4444 4.5714h10a5.5556 5.7143 0 0 0 5.5556-5.7143 5.5556 5.7143 0 0 0-3.6024-5.3437 6.6667 6.8571 0 0 0-6.3976-4.942zm0 1.1429a5.5556 5.7143 0 0 1 5.4666 4.6987 4.4444 4.5714 0 0 1 3.4223 4.4442 4.4444 4.5714 0 0 1-4.4444 4.5714h-10a3.3333 3.4286 0 0 1-3.3333-3.4286 3.3333 3.4286 0 0 1 3.3333-3.4286 3.3333 3.4286 0 0 1 0.11936 0.006696 5.5556 5.7143 0 0 1-0.11936-1.1496 5.5556 5.7143 0 0 1 5.5556-5.7143z" color="#eff0f1" fill="#232629"/> + <text transform="scale(1.0005 .99951)" x="4.5638237" y="15.247679" fill="#232629" font-family="sans-serif" font-size="4.4715px" letter-spacing="0px" stroke-width=".11179" word-spacing="0px" style="line-height:1.25" xml:space="preserve"><tspan x="4.5638237" y="15.247679" fill="#232629" stroke-width=".11179">MQTT</tspan></text> +</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MqttMonitor/icons/mqtt48-dark.svg Tue Apr 07 19:30:20 2020 +0200 @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg width="48" height="48" version="1.1" viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"> + <defs> + <style type="text/css">.ColorScheme-Text { + color:#eff0f1; + }</style> + </defs> + <g transform="matrix(2.4,0,0,2.375,-2.4,-63.875)" fill="#eff0f1"> + <path class="ColorScheme-Text" d="m11 29a6.6667 6.8571 0 0 0-6.6667 6.8571 6.6667 6.8571 0 0 0 0.00434 0.14732 4.4444 4.5714 0 0 0-3.3377 4.4241 4.4444 4.5714 0 0 0 4.4444 4.5714h10a5.5556 5.7143 0 0 0 5.5556-5.7143 5.5556 5.7143 0 0 0-3.6024-5.3438 6.6667 6.8571 0 0 0-6.3976-4.942zm0 1.1429a5.5556 5.7143 0 0 1 5.4666 4.6987 4.4444 4.5714 0 0 1 3.4223 4.4442 4.4444 4.5714 0 0 1-4.4444 4.5714h-10a3.3333 3.4286 0 0 1-3.3333-3.4286 3.3333 3.4286 0 0 1 3.3333-3.4286 3.3333 3.4286 0 0 1 0.11936 0.006696 5.5556 5.7143 0 0 1-0.11936-1.1496 5.5556 5.7143 0 0 1 5.5556-5.7143z" color="#eff0f1"/> + <text transform="scale(1.0005 .99951)" x="4.5638237" y="41.260399" font-family="sans-serif" font-size="4.4715px" letter-spacing="0px" stroke-width=".11179" word-spacing="0px" style="line-height:1.25" xml:space="preserve"><tspan x="4.5638237" y="41.260399" fill="#eff0f1" stroke-width=".11179">MQTT</tspan></text> + </g> +</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MqttMonitor/icons/mqtt48-light.svg Tue Apr 07 19:30:20 2020 +0200 @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg width="48" height="48" version="1.1" viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"> + <defs> + <style type="text/css">.ColorScheme-Text { + color:#eff0f1; + }</style> + </defs> + <g transform="matrix(2.4,0,0,2.375,-2.4,-63.875)" fill="#232629"> + <path class="ColorScheme-Text" d="m11 29a6.6667 6.8571 0 0 0-6.6667 6.8571 6.6667 6.8571 0 0 0 0.00434 0.14732 4.4444 4.5714 0 0 0-3.3377 4.4241 4.4444 4.5714 0 0 0 4.4444 4.5714h10a5.5556 5.7143 0 0 0 5.5556-5.7143 5.5556 5.7143 0 0 0-3.6024-5.3438 6.6667 6.8571 0 0 0-6.3976-4.942zm0 1.1429a5.5556 5.7143 0 0 1 5.4666 4.6987 4.4444 4.5714 0 0 1 3.4223 4.4442 4.4444 4.5714 0 0 1-4.4444 4.5714h-10a3.3333 3.4286 0 0 1-3.3333-3.4286 3.3333 3.4286 0 0 1 3.3333-3.4286 3.3333 3.4286 0 0 1 0.11936 0.006696 5.5556 5.7143 0 0 1-0.11936-1.1496 5.5556 5.7143 0 0 1 5.5556-5.7143z" color="#eff0f1"/> + <text transform="scale(1.0005 .99951)" x="4.5638237" y="41.260399" font-family="sans-serif" font-size="4.4715px" letter-spacing="0px" stroke-width=".11179" word-spacing="0px" style="line-height:1.25" xml:space="preserve"><tspan x="4.5638237" y="41.260399" fill="#232629" stroke-width=".11179">MQTT</tspan></text> + </g> +</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MqttMonitor/icons/profiles-dark.svg Tue Apr 07 19:30:20 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="m3.5 1v2.5h-2.5v3.75h2.5v7.5h-2.5v3.75h2.5v2.5h17.5v-20zm1.25 1.25h15v2.5h-15v-1.25zm0 3.75h15v13.75h-15z" color="#eff0f1" fill="currentColor"/> +</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MqttMonitor/icons/profiles-light.svg Tue Apr 07 19:30:20 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="m3.5 1v2.5h-2.5v3.75h2.5v7.5h-2.5v3.75h2.5v2.5h17.5v-20zm1.25 1.25h15v2.5h-15v-1.25zm0 3.75h15v13.75h-15z" color="#eff0f1" fill="#232629"/> +</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MqttMonitor/icons/quickopen-dark.svg Tue Apr 07 19:30:20 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="m12.667 1-6.6667 11.667h3.3333v8.3333l6.6667-11.667h-3.3333z" color="#eff0f1" fill="currentColor"/> +</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MqttMonitor/icons/quickopen-light.svg Tue Apr 07 19:30:20 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="m12.667 1-6.6667 11.667h3.3333v8.3333l6.6667-11.667h-3.3333z" color="#eff0f1" fill="#232629"/> +</svg>
--- a/PKGLIST Wed Jan 01 11:58:55 2020 +0100 +++ b/PKGLIST Tue Apr 07 19:30:20 2020 +0200 @@ -11,9 +11,14 @@ MqttMonitor/i18n/mqttmonitor_en.qm MqttMonitor/i18n/mqttmonitor_es.qm MqttMonitor/i18n/mqttmonitor_ru.qm -MqttMonitor/icons/connectionOptions.png -MqttMonitor/icons/mqtt22.png -MqttMonitor/icons/mqtt48.png -MqttMonitor/icons/profiles.png -MqttMonitor/icons/quickopen.png +MqttMonitor/icons/connectionOptions-dark.svg +MqttMonitor/icons/connectionOptions-light.svg +MqttMonitor/icons/mqtt22-dark.svg +MqttMonitor/icons/mqtt22-light.svg +MqttMonitor/icons/mqtt48-dark.svg +MqttMonitor/icons/mqtt48-light.svg +MqttMonitor/icons/profiles-dark.svg +MqttMonitor/icons/profiles-light.svg +MqttMonitor/icons/quickopen-dark.svg +MqttMonitor/icons/quickopen-light.svg PluginMqttMonitor.py
--- a/PluginMqttMonitor.e4p Wed Jan 01 11:58:55 2020 +0100 +++ b/PluginMqttMonitor.e4p Tue Apr 07 19:30:20 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 PluginMqttMonitor --> -<!-- 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>8b864e3e4a3495e242eae3cb3ef4dc8522bf6ce7</Hash> @@ -45,11 +45,16 @@ <Other>ChangeLog</Other> <Other>MqttMonitor/Documentation/LICENSE.GPL3</Other> <Other>MqttMonitor/Documentation/source</Other> - <Other>MqttMonitor/icons/connectionOptions.png</Other> - <Other>MqttMonitor/icons/mqtt22.png</Other> - <Other>MqttMonitor/icons/mqtt48.png</Other> - <Other>MqttMonitor/icons/profiles.png</Other> - <Other>MqttMonitor/icons/quickopen.png</Other> + <Other>MqttMonitor/icons/connectionOptions-dark.svg</Other> + <Other>MqttMonitor/icons/connectionOptions-light.svg</Other> + <Other>MqttMonitor/icons/mqtt22-dark.svg</Other> + <Other>MqttMonitor/icons/mqtt22-light.svg</Other> + <Other>MqttMonitor/icons/mqtt48-dark.svg</Other> + <Other>MqttMonitor/icons/mqtt48-light.svg</Other> + <Other>MqttMonitor/icons/profiles-dark.svg</Other> + <Other>MqttMonitor/icons/profiles-light.svg</Other> + <Other>MqttMonitor/icons/quickopen-dark.svg</Other> + <Other>MqttMonitor/icons/quickopen-light.svg</Other> <Other>PKGLIST</Other> <Other>PluginMqttMonitor.e4p</Other> <Other>PluginMqttMonitor.zip</Other>
--- a/PluginMqttMonitor.py Wed Jan 01 11:58:55 2020 +0100 +++ b/PluginMqttMonitor.py Tue Apr 07 19:30:20 2020 +0200 @@ -26,7 +26,7 @@ author = "Detlev Offenbach <detlev@die-offenbachs.de>" autoactivate = True deactivateable = True -version = "1.1.2" +version = "1.2.0" className = "MqttMonitorPlugin" packageName = "MqttMonitor" shortDescription = "Plug-in implementing a tool to connect to a MQTT broker" @@ -130,11 +130,24 @@ from MqttMonitor.MqttMonitorWidget import MqttMonitorWidget - self.__widget = MqttMonitorWidget(self) + try: + usesDarkPalette = e5App().usesDarkPalette() + except AttributeError: + from PyQt5.QtGui import QPalette + palette = self.palette() + lightness = palette.color(QPalette.Window).lightness() + usesDarkPalette = lightness <= 128 + if usesDarkPalette: + iconSuffix = "dark" + else: + iconSuffix = "light" + + self.__widget = MqttMonitorWidget(self, iconSuffix) self.__ui.addSideWidget( self.__ui.RightSide, self.__widget, UI.PixmapCache.getIcon( - os.path.join("MqttMonitor", "icons", "mqtt22.png")), + os.path.join("MqttMonitor", "icons", + "mqtt22-{0}".format(iconSuffix))), self.tr("MQTT Monitor")) self.__activateAct = E5Action(