1
0

qml: fixes

This commit is contained in:
Sander van Grieken
2022-07-26 18:08:32 +02:00
parent 509e0fcc07
commit 4f3dc7a2cc
2 changed files with 3 additions and 3 deletions

View File

@@ -38,7 +38,7 @@ GridLayout {
} }
Image { Image {
source: iconStyle == InfoTextArea.IconStyle.Info ? "../../../icons/info.png" : InfoTextArea.IconStyle.Warn ? "../../../icons/warning.png" : InfoTextArea.IconStyle.Error ? "../../../icons/expired.png" : "" source: iconStyle == InfoTextArea.IconStyle.Info ? "../../../icons/info.png" : iconStyle == InfoTextArea.IconStyle.Warn ? "../../../icons/warning.png" : iconStyle == InfoTextArea.IconStyle.Error ? "../../../icons/expired.png" : ""
anchors.left: parent.left anchors.left: parent.left
anchors.top: parent.top anchors.top: parent.top
anchors.leftMargin: constants.paddingLarge anchors.leftMargin: constants.paddingLarge

View File

@@ -74,12 +74,12 @@ class QENetwork(QObject, QtEventListener):
self.statusChanged.emit() self.statusChanged.emit()
chains = len(self.network.get_blockchains()) chains = len(self.network.get_blockchains())
if chains != self._chaintips: if chains != self._chaintips:
self._logger.debug('chain tips # changed: ' + chains) self._logger.debug('chain tips # changed: %d', chains)
self._chaintips = chains self._chaintips = chains
self.chaintipsChanged.emit() self.chaintipsChanged.emit()
server_lag = self.network.get_local_height() - self.network.get_server_height() server_lag = self.network.get_local_height() - self.network.get_server_height()
if self._islagging ^ (server_lag > 1): if self._islagging ^ (server_lag > 1):
self._logger.debug('lagging changed: ' + (server_lag > 1)) self._logger.debug('lagging changed: %s', str(server_lag > 1))
self._islagging = server_lag > 1 self._islagging = server_lag > 1
self.isLaggingChanged.emit() self.isLaggingChanged.emit()