fix slowness with status bar text
This commit is contained in:
parent
ad51d88297
commit
4345f637ee
|
@ -394,9 +394,7 @@ class ElectrumWindow(QMainWindow):
|
||||||
text = _( "Not connected" )
|
text = _( "Not connected" )
|
||||||
icon = QIcon(":icons/status_disconnected.png")
|
icon = QIcon(":icons/status_disconnected.png")
|
||||||
|
|
||||||
if self.funds_error:
|
self.status_text = text
|
||||||
text = _( "Not enough funds" )
|
|
||||||
|
|
||||||
self.statusBar().showMessage(text)
|
self.statusBar().showMessage(text)
|
||||||
self.status_button.setIcon( icon )
|
self.status_button.setIcon( icon )
|
||||||
|
|
||||||
|
@ -718,13 +716,16 @@ class ElectrumWindow(QMainWindow):
|
||||||
if inputs:
|
if inputs:
|
||||||
palette = QPalette()
|
palette = QPalette()
|
||||||
palette.setColor(self.amount_e.foregroundRole(), QColor('black'))
|
palette.setColor(self.amount_e.foregroundRole(), QColor('black'))
|
||||||
|
text = self.status_text
|
||||||
else:
|
else:
|
||||||
palette = QPalette()
|
palette = QPalette()
|
||||||
palette.setColor(self.amount_e.foregroundRole(), QColor('red'))
|
palette.setColor(self.amount_e.foregroundRole(), QColor('red'))
|
||||||
self.funds_error = True
|
self.funds_error = True
|
||||||
|
text = _( "Not enough funds" )
|
||||||
|
|
||||||
|
self.statusBar().showMessage(text)
|
||||||
self.amount_e.setPalette(palette)
|
self.amount_e.setPalette(palette)
|
||||||
self.fee_e.setPalette(palette)
|
self.fee_e.setPalette(palette)
|
||||||
self.update_wallet()
|
|
||||||
|
|
||||||
self.amount_e.textChanged.connect(lambda: entry_changed(False) )
|
self.amount_e.textChanged.connect(lambda: entry_changed(False) )
|
||||||
self.fee_e.textChanged.connect(lambda: entry_changed(True) )
|
self.fee_e.textChanged.connect(lambda: entry_changed(True) )
|
||||||
|
@ -1131,6 +1132,7 @@ class ElectrumWindow(QMainWindow):
|
||||||
return textbox
|
return textbox
|
||||||
|
|
||||||
def create_status_bar(self):
|
def create_status_bar(self):
|
||||||
|
self.status_text = ""
|
||||||
sb = QStatusBar()
|
sb = QStatusBar()
|
||||||
sb.setFixedHeight(35)
|
sb.setFixedHeight(35)
|
||||||
if self.wallet.seed:
|
if self.wallet.seed:
|
||||||
|
|
Loading…
Reference in New Issue