electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 95095927675c2af26f4537d8b2d43dc99cabe1f1
parent 52a9fdf6f6e80e5099995b55cf71181de4f3a997
Author: ThomasV <thomasv@electrum.org>
Date:   Wed, 28 Sep 2016 17:36:06 +0200

new icon for xpub/xprv dialogs

Diffstat:
Mgui/qt/installwizard.py | 2+-
Mgui/qt/seed_dialog.py | 20+++++++-------------
Micons.qrc | 3+--
Dicons/cold_seed.png | 0
Dicons/hot_seed.png | 0
Aicons/xpub.png | 0
6 files changed, 9 insertions(+), 16 deletions(-)

diff --git a/gui/qt/installwizard.py b/gui/qt/installwizard.py @@ -412,7 +412,7 @@ class InstallWizard(QDialog, MessageBoxMixin, BaseWizard): _("Please share it with your cosigners.") ]) vbox = QVBoxLayout() - layout = SeedDisplayLayout(xpub, title=msg, sid='hot') + layout = SeedDisplayLayout(xpub, title=msg, xpub=True) vbox.addLayout(layout.layout()) self.set_main_layout(vbox, _('Master Public Key')) return None diff --git a/gui/qt/seed_dialog.py b/gui/qt/seed_dialog.py @@ -30,19 +30,13 @@ from electrum.i18n import _ from util import * from qrtextedit import ShowQRTextEdit, ScanQRTextEdit -def icon_filename(sid): - if sid == 'cold': - return ":icons/cold_seed.png" - elif sid == 'hot': - return ":icons/hot_seed.png" - else: - return ":icons/seed.png" - class SeedLayoutBase(object): - def _seed_layout(self, seed=None, title=None, sid=None): + + def _seed_layout(self, seed=None, title=None, xpub=False): + icon = ":icons/xpub.png" if xpub else ":icons/seed.png" logo = QLabel() - logo.setPixmap(QPixmap(icon_filename(sid)).scaledToWidth(56)) + logo.setPixmap(QPixmap(icon).scaledToWidth(64)) logo.setMaximumWidth(60) if seed: self.seed_e = ShowQRTextEdit() @@ -70,8 +64,8 @@ class SeedLayoutBase(object): class SeedDisplayLayout(SeedLayoutBase): - def __init__(self, seed, title=None, sid=None): - self.layout_ = self._seed_layout(seed=seed, title=title, sid=sid) + def __init__(self, seed, title=None, xpub=False): + self.layout_ = self._seed_layout(seed=seed, title=title, xpub=xpub) @@ -107,7 +101,7 @@ class TextInputLayout(SeedLayoutBase): def __init__(self, parent, title, is_valid): self.is_valid = is_valid self.parent = parent - self.layout_ = self._seed_layout(title=title) + self.layout_ = self._seed_layout(title=title, xpub=True) self.seed_e.textChanged.connect(self.on_edit) def get_text(self): diff --git a/icons.qrc b/icons.qrc @@ -7,13 +7,11 @@ <file>icons/clock4.png</file> <file>icons/clock5.png</file> <file>icons/confirmed.png</file> - <file>icons/cold_seed.png</file> <file>icons/copy.png</file> <file>icons/expired.png</file> <file>icons/electrum_light_icon.png</file> <file>icons/electrum_dark_icon.png</file> <file>icons/file.png</file> - <file>icons/hot_seed.png</file> <file>icons/keepkey.png</file> <file>icons/keepkey_unpaired.png</file> <file>icons/key.png</file> @@ -39,5 +37,6 @@ <file>icons/unlock.png</file> <file>icons/warning.png</file> <file>icons/zoom.png</file> + <file>icons/xpub.png</file> </qresource> </RCC> diff --git a/icons/cold_seed.png b/icons/cold_seed.png Binary files differ. diff --git a/icons/hot_seed.png b/icons/hot_seed.png Binary files differ. diff --git a/icons/xpub.png b/icons/xpub.png Binary files differ.