|
|
@ -174,6 +174,8 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger): |
|
|
|
|
|
|
|
self.completions = QStringListModel() |
|
|
|
|
|
|
|
coincontrol_sb = self.create_coincontrol_statusbar() |
|
|
|
|
|
|
|
self.tabs = tabs = QTabWidget(self) |
|
|
|
self.send_tab = self.create_send_tab() |
|
|
|
self.receive_tab = self.create_receive_tab() |
|
|
@ -202,7 +204,14 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger): |
|
|
|
add_optional_tab(tabs, self.console_tab, read_QIcon("tab_console.png"), _("Con&sole"), "console") |
|
|
|
|
|
|
|
tabs.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) |
|
|
|
self.setCentralWidget(tabs) |
|
|
|
|
|
|
|
central_widget = QWidget() |
|
|
|
vbox = QVBoxLayout(central_widget) |
|
|
|
vbox.setContentsMargins(0, 0, 0, 0) |
|
|
|
vbox.addWidget(tabs) |
|
|
|
vbox.addWidget(coincontrol_sb) |
|
|
|
|
|
|
|
self.setCentralWidget(central_widget) |
|
|
|
|
|
|
|
if self.config.get("is_maximized"): |
|
|
|
self.showMaximized() |
|
|
@ -1759,8 +1768,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger): |
|
|
|
def create_utxo_tab(self): |
|
|
|
from .utxo_list import UTXOList |
|
|
|
self.utxo_list = UTXOList(self) |
|
|
|
t = self.utxo_list.get_toolbar() |
|
|
|
return self.create_list_tab(self.utxo_list, t) |
|
|
|
return self.create_list_tab(self.utxo_list) |
|
|
|
|
|
|
|
def create_contacts_tab(self): |
|
|
|
from .contact_list import ContactList |
|
|
@ -1948,6 +1956,33 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger): |
|
|
|
run_hook('create_status_bar', sb) |
|
|
|
self.setStatusBar(sb) |
|
|
|
|
|
|
|
def create_coincontrol_statusbar(self): |
|
|
|
self.coincontrol_sb = sb = QStatusBar() |
|
|
|
sb.setSizeGripEnabled(False) |
|
|
|
sb.setFixedHeight(3 * char_width_in_lineedit()) |
|
|
|
sb.setStyleSheet('QStatusBar::item {border: None;} ' |
|
|
|
+ ColorScheme.GREEN.as_stylesheet(True)) |
|
|
|
|
|
|
|
self.coincontrol_label = QLabel() |
|
|
|
self.coincontrol_label.setSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred) |
|
|
|
self.coincontrol_label.setTextInteractionFlags(Qt.TextSelectableByMouse) |
|
|
|
sb.addWidget(self.coincontrol_label) |
|
|
|
|
|
|
|
clear_cc_button = EnterButton(_('Reset'), lambda: self.utxo_list.set_spend_list([])) |
|
|
|
clear_cc_button.setStyleSheet("margin-right: 5px;") |
|
|
|
sb.addPermanentWidget(clear_cc_button) |
|
|
|
|
|
|
|
sb.setVisible(False) |
|
|
|
return sb |
|
|
|
|
|
|
|
def set_coincontrol_msg(self, msg: Optional[str]) -> None: |
|
|
|
if not msg: |
|
|
|
self.coincontrol_label.setText("") |
|
|
|
self.coincontrol_sb.setVisible(False) |
|
|
|
return |
|
|
|
self.coincontrol_label.setText(msg) |
|
|
|
self.coincontrol_sb.setVisible(True) |
|
|
|
|
|
|
|
def update_lock_icon(self): |
|
|
|
icon = read_QIcon("lock.png") if self.wallet.has_password() else read_QIcon("unlock.png") |
|
|
|
self.password_button.setIcon(icon) |
|
|
|