status bar
This commit is contained in:
18
qt.py
18
qt.py
@@ -107,11 +107,12 @@ class Plugin(BalPlugin):
|
||||
@hook
|
||||
def create_status_bar(self, sb):
|
||||
_logger.info("HOOK create status bar")
|
||||
return
|
||||
print("STATUS_BAR")
|
||||
Util.print_var(sb)
|
||||
b = StatusBarButton(
|
||||
read_QIcon_from_bytes(self.bal_plugin.read_file("icons/bal32x32.png")),
|
||||
read_QIcon_from_bytes(self.read_file("icons/bal32x32.png")),
|
||||
"Bal " + _("Bitcoin After Life"),
|
||||
partial(self.setup_dialog, sb),
|
||||
partial(self.settings_dialog, sb),
|
||||
sb.height(),
|
||||
)
|
||||
sb.addPermanentWidget(b)
|
||||
@@ -188,11 +189,11 @@ class Plugin(BalPlugin):
|
||||
self.extension = bool(keystore.get_passphrase(password))
|
||||
return keystore.get_seed(password)
|
||||
|
||||
def settings_dialog(self, window, wallet):
|
||||
def settings_dialog(self, window=None, wallet=None):
|
||||
|
||||
d = BalDialog(window, self, self.get_window_title("Settings"))
|
||||
d.setMinimumSize(100, 200)
|
||||
qicon = read_QPixmap_from_bytes(self.read_file("icons/bal32x32.png"))
|
||||
qicon = read_QPixmap_from_bytes(self.read_file("icons/bal16x16.png"))
|
||||
lbl_logo = QLabel()
|
||||
lbl_logo.setPixmap(qicon)
|
||||
|
||||
@@ -860,7 +861,7 @@ class BalWindow:
|
||||
# payment_identifier=payment_identifier,
|
||||
)
|
||||
d.setWindowIcon(
|
||||
read_QIcon_from_bytes(self.bal_plugin.read_file("icons/bal32x32.png"))
|
||||
read_QIcon_from_bytes(self.bal_plugin.read_file("icons/bal16x16.png"))
|
||||
)
|
||||
except SerializationError as e:
|
||||
_logger.error("unable to deserialize the transaction")
|
||||
@@ -1871,12 +1872,13 @@ class PercAmountEdit(BTCAmountEdit):
|
||||
|
||||
|
||||
class BalDialog(WindowModalDialog):
|
||||
def __init__(self, parent, bal_plugin, title=None, icon="icons/bal32x32.png"):
|
||||
def __init__(self, parent, bal_plugin, title=None, icon="icons/bal16x16.png"):
|
||||
self.parent = parent
|
||||
self.thread = None
|
||||
WindowModalDialog.__init__(self, parent, title)
|
||||
# WindowModalDialog.__init__(self,parent)
|
||||
self.setWindowIcon(read_QIcon_from_bytes(bal_plugin.read_file(icon)))
|
||||
#print(bal_plugin.read_file(icon))
|
||||
#self.setWindowIcon(read_QIcon_from_bytes(bal_plugin.read_file(icon)))
|
||||
|
||||
def closeEvent(self, event):
|
||||
self._stopping = True
|
||||
|
||||
Reference in New Issue
Block a user