diff --git a/res/icons/AUTHORS b/res/icons/AUTHORS index 30fa11deb50b317717e38d232a09eac0b5d71911..ce906d97249576be7749e3281b359d823bc8cf26 100644 --- a/res/icons/AUTHORS +++ b/res/icons/AUTHORS @@ -32,4 +32,10 @@ noun_213196_cc.svg : by Aha-Soft noun_60040_cc.svg : by Dmitry Baranovskiy noun_87601_cc.svg : by Arthur Shlain noun_274635_cc.svg : by Pham Thi Dieu Linh -noun_198591_cc.svg : by Ðндрей Уханёв \ No newline at end of file +noun_198591_cc.svg : by Ðндрей Уханёв +noun_269788_cc.svg : by TMD +noun_269789_cc.svg : by TMD +noun_269790_cc.svg : by TMD +noun_269791_cc.svg : by TMD +noun_269792_cc.svg : by TMD +noun_269793_cc.svg : by TMD \ No newline at end of file diff --git a/res/icons/connected.svg b/res/icons/connected.svg deleted file mode 100644 index c6a97c9c66be3ebf88117731bd8e14d55542ef8b..0000000000000000000000000000000000000000 --- a/res/icons/connected.svg +++ /dev/null @@ -1,98 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- Created with Inkscape (http://www.inkscape.org/) --> - -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://creativecommons.org/ns#" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:xlink="http://www.w3.org/1999/xlink" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="100" - height="100" - viewBox="0 0 100 100" - id="svg3336" - version="1.1" - inkscape:version="0.91 r13725" - sodipodi:docname="connected.svg"> - <defs - id="defs3338"> - <linearGradient - inkscape:collect="always" - id="linearGradient4150"> - <stop - style="stop-color:#ffffff;stop-opacity:1;" - offset="0" - id="stop4152" /> - <stop - style="stop-color:#ffffff;stop-opacity:0.04620462" - offset="1" - id="stop4154" /> - </linearGradient> - <radialGradient - inkscape:collect="always" - xlink:href="#linearGradient4150" - id="radialGradient4162" - cx="52.325901" - cy="1005.1627" - fx="52.325901" - fy="1005.1627" - r="42.926411" - gradientTransform="matrix(1.539681,0,0,1.5451884,-68.190831,-562.49866)" - gradientUnits="userSpaceOnUse" /> - </defs> - <sodipodi:namedview - id="base" - pagecolor="#ffffff" - bordercolor="#666666" - borderopacity="1.0" - inkscape:pageopacity="0.0" - inkscape:pageshadow="2" - inkscape:zoom="2.8284271" - inkscape:cx="18.741815" - inkscape:cy="33.829638" - inkscape:document-units="px" - inkscape:current-layer="layer1" - showgrid="false" - units="px" - inkscape:snap-bbox="false" - inkscape:window-width="1366" - inkscape:window-height="709" - inkscape:window-x="-4" - inkscape:window-y="0" - inkscape:window-maximized="1" /> - <metadata - id="metadata3341"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title /> - </cc:Work> - </rdf:RDF> - </metadata> - <g - inkscape:label="Calque 1" - inkscape:groupmode="layer" - id="layer1" - transform="translate(0,-952.36216)"> - <ellipse - style="opacity:1;fill:#17d017;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" - id="path3346" - cx="51.785713" - cy="1005.5765" - rx="41.785713" - ry="40.714287" /> - <ellipse - style="opacity:0.65;fill:url(#radialGradient4162);fill-opacity:1;stroke:none;stroke-width:1.25129819;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" - id="path4148" - cx="12.374369" - cy="990.66699" - rx="64.928177" - ry="65.10495" /> - </g> -</svg> diff --git a/res/icons/disconnected.svg b/res/icons/disconnected.svg deleted file mode 100644 index 6647ff69d1f4db23fc7130d611543229eb42b3af..0000000000000000000000000000000000000000 --- a/res/icons/disconnected.svg +++ /dev/null @@ -1,98 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- Created with Inkscape (http://www.inkscape.org/) --> - -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://creativecommons.org/ns#" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:xlink="http://www.w3.org/1999/xlink" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="100" - height="100" - viewBox="0 0 100 100" - id="svg3336" - version="1.1" - inkscape:version="0.91 r13725" - sodipodi:docname="disconnected.svg"> - <defs - id="defs3338"> - <linearGradient - inkscape:collect="always" - id="linearGradient4150"> - <stop - style="stop-color:#ffffff;stop-opacity:1;" - offset="0" - id="stop4152" /> - <stop - style="stop-color:#ffffff;stop-opacity:0.04620462" - offset="1" - id="stop4154" /> - </linearGradient> - <radialGradient - inkscape:collect="always" - xlink:href="#linearGradient4150" - id="radialGradient4162" - cx="52.325901" - cy="1005.1627" - fx="52.325901" - fy="1005.1627" - r="42.926411" - gradientTransform="matrix(1.539681,0,0,1.5451884,-50.51316,-559.67022)" - gradientUnits="userSpaceOnUse" /> - </defs> - <sodipodi:namedview - id="base" - pagecolor="#ffffff" - bordercolor="#666666" - borderopacity="1.0" - inkscape:pageopacity="0.0" - inkscape:pageshadow="2" - inkscape:zoom="2.8284271" - inkscape:cx="18.741815" - inkscape:cy="33.829638" - inkscape:document-units="px" - inkscape:current-layer="layer1" - showgrid="false" - units="px" - inkscape:snap-bbox="false" - inkscape:window-width="1366" - inkscape:window-height="709" - inkscape:window-x="-4" - inkscape:window-y="0" - inkscape:window-maximized="1" /> - <metadata - id="metadata3341"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title /> - </cc:Work> - </rdf:RDF> - </metadata> - <g - inkscape:label="Calque 1" - inkscape:groupmode="layer" - id="layer1" - transform="translate(0,-952.36216)"> - <ellipse - style="opacity:1;fill:#c60002;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" - id="path3346" - cx="51.785713" - cy="1005.5765" - rx="41.785713" - ry="40.714287" /> - <ellipse - style="opacity:0.65;fill:url(#radialGradient4162);fill-opacity:1;stroke:none;stroke-width:1.25129819;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" - id="path4148" - cx="30.05204" - cy="993.49536" - rx="64.928177" - ry="65.10495" /> - </g> -</svg> diff --git a/res/icons/icons.qrc b/res/icons/icons.qrc index 168d808be973d92409f000af4a95a20d7723b9b0..d612c4612504f0594efe11c9a232deeac58bda79 100644 --- a/res/icons/icons.qrc +++ b/res/icons/icons.qrc @@ -29,9 +29,9 @@ <file alias="settings_app_icon">noun_42425_cc.svg</file> <file alias="settings_network_icon">noun_62146_cc.svg</file> <file alias="explorer_icon">noun_101791_cc.svg</file> - <file alias="connected">connected.svg</file> - <file alias="weak_connect">weak_connect.svg</file> - <file alias="disconnected">disconnected.svg</file> + <file alias="connected">noun_269788_cc.svg</file> + <file alias="weak_connect">noun_269792_cc.svg</file> + <file alias="disconnected">noun_269793_cc.svg</file> <file alias="member">noun_213188_cc.svg</file> <file alias="not_member">noun_213192_cc.svg</file> <file alias="member_warning">noun_213886_cc.svg</file> @@ -39,6 +39,5 @@ <file alias="offline">noun_87601_cc.svg</file> <file alias="synchronized">noun_274635_cc.svg</file> <file alias="corrupted">noun_198591_cc.svg</file> - </qresource> </RCC> diff --git a/res/icons/noun_269788_cc.svg b/res/icons/noun_269788_cc.svg new file mode 100644 index 0000000000000000000000000000000000000000..0e7ff36d7682e4c2bdadf8f6f70f6eac6371a664 --- /dev/null +++ b/res/icons/noun_269788_cc.svg @@ -0,0 +1,74 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + x="0px" + y="0px" + viewBox="0 0 262.20472 184.25197" + enable-background="new 0 0 100 100" + xml:space="preserve" + id="svg2" + inkscape:version="0.91 r13725" + sodipodi:docname="noun_269788_cc.svg" + width="74mm" + height="52mm"><metadata + id="metadata22"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs + id="defs20" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1366" + inkscape:window-height="712" + id="namedview18" + showgrid="false" + inkscape:zoom="0.6675088" + inkscape:cx="168.27594" + inkscape:cy="16.790099" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="1" + inkscape:current-layer="svg2" + units="mm" /><rect + x="11.055084" + y="144.259" + width="34.501839" + height="34.501839" + id="rect4" + style="fill:#00aa00" /><rect + x="60.344528" + y="109.75682" + width="34.501839" + height="69.006248" + id="rect6" + style="fill:#00aa00" /><rect + x="109.63396" + y="75.254662" + width="34.501839" + height="103.5081" + id="rect8" + style="fill:#00aa00" /><rect + x="158.92342" + y="40.752491" + width="34.499264" + height="138.00993" + id="rect10" + style="fill:#00aa00" /><rect + x="208.21284" + y="6.2480106" + width="34.501839" + height="172.51178" + id="rect12" + style="fill:#00aa00" /></svg> \ No newline at end of file diff --git a/res/icons/noun_269792_cc.svg b/res/icons/noun_269792_cc.svg new file mode 100644 index 0000000000000000000000000000000000000000..47fce937268e6fbab30233a12f9651e271087642 --- /dev/null +++ b/res/icons/noun_269792_cc.svg @@ -0,0 +1,70 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + x="0px" + y="0px" + viewBox="0 0 184.25197 131.10236" + enable-background="new 0 0 100 100" + xml:space="preserve" + id="svg2" + inkscape:version="0.91 r13725" + sodipodi:docname="noun_269792_cc.svg" + width="52mm" + height="37mm"><metadata + id="metadata22"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs + id="defs20" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1366" + inkscape:window-height="712" + id="namedview18" + showgrid="false" + inkscape:zoom="1.888" + inkscape:cx="-23.710046" + inkscape:cy="47.263014" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="1" + inkscape:current-layer="svg2" + units="mm" /><rect + x="5.8220339" + y="102.44091" + width="24.950264" + height="24.950264" + id="rect4" + style="fill:#d45500" /><rect + x="41.466068" + y="77.490646" + width="24.950264" + height="49.90239" + id="rect6" + style="fill:#d45500" /><rect + x="77.110092" + y="52.540382" + width="24.950264" + height="74.852654" + id="rect8" + style="fill:#d45500" /><path + d="m 137.70439,127.39303 -24.95025,0 0,-99.802926 24.9484,0 0,99.802926 z m -21.22745,-3.72281 17.50278,0 0,-92.357307 -17.50278,0 0,92.357307 z" + id="path10" + inkscape:connector-curvature="0" + style="fill:#d45500" /><path + d="m 173.34842,127.39303 -24.95025,0 0,-124.7550516 24.95025,0 0,124.7550516 z m -21.22745,-3.72281 17.50465,0 0,-117.3094328 -17.50465,0 0,117.3094328 z" + id="path12" + inkscape:connector-curvature="0" + style="fill:#d45500" /></svg> \ No newline at end of file diff --git a/res/icons/noun_269793_cc.svg b/res/icons/noun_269793_cc.svg new file mode 100644 index 0000000000000000000000000000000000000000..7c9bf0c5329c13d5fd2759eb7808b68b0d9db078 --- /dev/null +++ b/res/icons/noun_269793_cc.svg @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + x="0px" + y="0px" + viewBox="0 0 184.25197 131.10236" + enable-background="new 0 0 100 100" + xml:space="preserve" + id="svg2" + inkscape:version="0.91 r13725" + sodipodi:docname="noun_269793_cc.svg" + width="52mm" + height="37mm"><metadata + id="metadata22"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs + id="defs20" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1366" + inkscape:window-height="712" + id="namedview18" + showgrid="false" + inkscape:zoom="0.118" + inkscape:cx="-2954.4935" + inkscape:cy="962.76781" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="1" + inkscape:current-layer="svg2" + units="mm" /><path + d="m 28.934386,129.85912 -25.8157419,0 0,-25.81766 25.8157419,0 0,25.81766 z m -21.9637959,-3.85193 18.1118499,0 0,-18.11185 -18.1118499,0 0,18.11185 z" + id="path4" + inkscape:connector-curvature="0" + style="fill:#d40000" /><path + d="m 65.814843,129.85912 -25.815743,0 0,-51.633399 25.815743,0 0,51.633399 z m -21.963796,-3.85193 18.111849,0 0,-43.929529 -18.111849,0 0,43.929529 z" + id="path6" + inkscape:connector-curvature="0" + style="fill:#d40000" /><path + d="m 102.6953,129.85912 -25.815743,0 0,-77.449138 25.815743,0 0,77.449138 z m -21.963796,-3.85193 18.111849,0 0,-69.745263 -18.111849,0 0,69.745263 z" + id="path8" + inkscape:connector-curvature="0" + style="fill:#d40000" /><path + d="m 139.57576,129.85912 -25.81575,0 0,-103.26488 25.81382,0 0,103.26488 z m -21.9638,-3.85193 18.10992,0 0,-95.561003 -18.10992,0 0,95.561003 z" + id="path10" + inkscape:connector-curvature="0" + style="fill:#d40000" /><path + d="m 176.45621,129.85912 -25.81574,0 0,-129.08254796 25.81574,0 0,129.08254796 z m -21.96379,-3.85193 18.11185,0 0,-121.3786714 -18.11185,0 0,121.3786714 z" + id="path12" + inkscape:connector-curvature="0" + style="fill:#d40000" /></svg> \ No newline at end of file diff --git a/src/sakia/gui/community_view.py b/src/sakia/gui/community_view.py index fc0489ab510dfc4b3d6a476db082db6535ef05ad..18aa0c0589fd065fa1bb9b2a2b26f6ae24181718 100644 --- a/src/sakia/gui/community_view.py +++ b/src/sakia/gui/community_view.py @@ -7,8 +7,8 @@ Created on 2 févr. 2014 import logging import time -from PyQt5.QtCore import pyqtSlot, QDateTime, QLocale, QEvent, QT_TRANSLATE_NOOP -from PyQt5.QtGui import QIcon +from PyQt5.QtCore import pyqtSlot, QDateTime, QLocale, QEvent, QT_TRANSLATE_NOOP, Qt +from PyQt5.QtGui import QIcon, QPixmap from PyQt5.QtWidgets import QWidget, QMessageBox, QDialog, QPushButton, QTabBar, QAction from .graphs.wot_tab import WotTabWidget @@ -41,8 +41,7 @@ class CommunityWidget(QWidget, Ui_CommunityWidget): _action_publish_uid_text = QT_TRANSLATE_NOOP("CommunityWidget", "Publish UID") _action_revoke_uid_text = QT_TRANSLATE_NOOP("CommunityWidget", "Revoke UID") - - def __init__(self, app, status_label): + def __init__(self, app, status_label, label_icon): """ Constructor """ @@ -52,6 +51,7 @@ class CommunityWidget(QWidget, Ui_CommunityWidget): self.community = None self.password_asker = None self.status_label = status_label + self.label_icon = label_icon self.status_info = [] @@ -257,14 +257,14 @@ class CommunityWidget(QWidget, Ui_CommunityWidget): self.button_send_money.setEnabled(True) if self.community.network.quality > 0.66: - icon = '<img src=":/icons/connected" width="12" height="12"/>' + icon = ':/icons/connected' elif self.community.network.quality > 0.33: - icon = '<img src=":/icons/weak_connect" width="12" height="12"/>' + icon = ':/icons/weak_connect' else: - icon = '<img src=":/icons/disconnected" width="12" height="12"/>' + icon = ':/icons/disconnected' status_infotext = " - ".join([self.app.notifications[info][0] for info in self.status_info]) - label_text = "{0}{1}".format(icon, text) + label_text = text if status_infotext != "": label_text += " - {0}".format(status_infotext) @@ -279,6 +279,7 @@ class CommunityWidget(QWidget, Ui_CommunityWidget): .format("#") self.status_label.setText(label_text) + self.label_icon.setPixmap(QPixmap(icon).scaled(24, 24, Qt.KeepAspectRatio, Qt.SmoothTransformation)) @once_at_a_time @asyncify diff --git a/src/sakia/gui/mainwindow.py b/src/sakia/gui/mainwindow.py index 3c0b01812dc1a4de69231c7bb232fa7024fdf519..561a49f0b1459b11fa8af2c807cdbdf924a77b6a 100644 --- a/src/sakia/gui/mainwindow.py +++ b/src/sakia/gui/mainwindow.py @@ -54,9 +54,12 @@ class MainWindow(QMainWindow, Ui_MainWindow): self.app.version_requested.connect(self.latest_version_requested) + self.label_icon = QLabel("", self) + self.statusbar.addPermanentWidget(self.label_icon, 1) + self.status_label = QLabel("", self) self.status_label.setTextFormat(Qt.RichText) - self.statusbar.addPermanentWidget(self.status_label, 1) + self.statusbar.addPermanentWidget(self.status_label, 2) self.label_time = QLabel("", self) self.statusbar.addPermanentWidget(self.label_time) @@ -76,7 +79,7 @@ class MainWindow(QMainWindow, Ui_MainWindow): self.centralWidget().layout().addWidget(self.homescreen) self.homescreen.toolbutton_connect.setMenu(self.menu_change_account) - self.community_view = CommunityWidget(self.app, self.status_label) + self.community_view = CommunityWidget(self.app, self.status_label, self.label_icon) self.community_view.button_home.clicked.connect(lambda: self.change_community(None)) self.community_view.button_certification.clicked.connect(self.open_certification_dialog) self.community_view.button_send_money.clicked.connect(self.open_transfer_money_dialog)