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.")
|
_("Please share it with your cosigners.")
|
||||||
])
|
])
|
||||||
vbox = QVBoxLayout()
|
vbox = QVBoxLayout()
|
||||||
layout = SeedDisplayLayout(xpub, title=msg, sid='hot')
|
layout = SeedDisplayLayout(xpub, title=msg, xpub=True)
|
||||||
vbox.addLayout(layout.layout())
|
vbox.addLayout(layout.layout())
|
||||||
self.set_main_layout(vbox, _('Master Public Key'))
|
self.set_main_layout(vbox, _('Master Public Key'))
|
||||||
return None
|
return None
|
||||||
|
|
|
@ -30,19 +30,13 @@ from electrum.i18n import _
|
||||||
from util import *
|
from util import *
|
||||||
from qrtextedit import ShowQRTextEdit, ScanQRTextEdit
|
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):
|
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 = QLabel()
|
||||||
logo.setPixmap(QPixmap(icon_filename(sid)).scaledToWidth(56))
|
logo.setPixmap(QPixmap(icon).scaledToWidth(64))
|
||||||
logo.setMaximumWidth(60)
|
logo.setMaximumWidth(60)
|
||||||
if seed:
|
if seed:
|
||||||
self.seed_e = ShowQRTextEdit()
|
self.seed_e = ShowQRTextEdit()
|
||||||
|
@ -70,8 +64,8 @@ class SeedLayoutBase(object):
|
||||||
|
|
||||||
|
|
||||||
class SeedDisplayLayout(SeedLayoutBase):
|
class SeedDisplayLayout(SeedLayoutBase):
|
||||||
def __init__(self, seed, title=None, sid=None):
|
def __init__(self, seed, title=None, xpub=False):
|
||||||
self.layout_ = self._seed_layout(seed=seed, title=title, sid=sid)
|
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):
|
def __init__(self, parent, title, is_valid):
|
||||||
self.is_valid = is_valid
|
self.is_valid = is_valid
|
||||||
self.parent = parent
|
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)
|
self.seed_e.textChanged.connect(self.on_edit)
|
||||||
|
|
||||||
def get_text(self):
|
def get_text(self):
|
||||||
|
|
|
@ -7,13 +7,11 @@
|
||||||
<file>icons/clock4.png</file>
|
<file>icons/clock4.png</file>
|
||||||
<file>icons/clock5.png</file>
|
<file>icons/clock5.png</file>
|
||||||
<file>icons/confirmed.png</file>
|
<file>icons/confirmed.png</file>
|
||||||
<file>icons/cold_seed.png</file>
|
|
||||||
<file>icons/copy.png</file>
|
<file>icons/copy.png</file>
|
||||||
<file>icons/expired.png</file>
|
<file>icons/expired.png</file>
|
||||||
<file>icons/electrum_light_icon.png</file>
|
<file>icons/electrum_light_icon.png</file>
|
||||||
<file>icons/electrum_dark_icon.png</file>
|
<file>icons/electrum_dark_icon.png</file>
|
||||||
<file>icons/file.png</file>
|
<file>icons/file.png</file>
|
||||||
<file>icons/hot_seed.png</file>
|
|
||||||
<file>icons/keepkey.png</file>
|
<file>icons/keepkey.png</file>
|
||||||
<file>icons/keepkey_unpaired.png</file>
|
<file>icons/keepkey_unpaired.png</file>
|
||||||
<file>icons/key.png</file>
|
<file>icons/key.png</file>
|
||||||
|
@ -39,5 +37,6 @@
|
||||||
<file>icons/unlock.png</file>
|
<file>icons/unlock.png</file>
|
||||||
<file>icons/warning.png</file>
|
<file>icons/warning.png</file>
|
||||||
<file>icons/zoom.png</file>
|
<file>icons/zoom.png</file>
|
||||||
|
<file>icons/xpub.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</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