new icon for xpub/xprv dialogs
This commit is contained in:
parent
52a9fdf6f6
commit
9509592767
|
@ -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
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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>
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 9.7 KiB |
Binary file not shown.
Before Width: | Height: | Size: 9.8 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.4 KiB |
Loading…
Reference in New Issue