From e84bc4561f05646fc5f704390ad19ad1121b6ab8 Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Wed, 11 May 2022 12:22:31 +0200 Subject: [PATCH] bold font wasn't loaded when regular font loading was succesful some styling fixes --- electrum/gui/qml/components/Addresses.qml | 2 +- electrum/gui/qml/components/Receive.qml | 3 ++- electrum/gui/qml/components/Send.qml | 3 ++- electrum/gui/qml/qeapp.py | 9 +++++---- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/electrum/gui/qml/components/Addresses.qml b/electrum/gui/qml/components/Addresses.qml index c58d237a0..c4d249da4 100644 --- a/electrum/gui/qml/components/Addresses.qml +++ b/electrum/gui/qml/components/Addresses.qml @@ -81,7 +81,7 @@ Pane { color: model.held ? Qt.rgba(1,0,0,0.75) : model.numtx > 0 - ? model.balance == 0 + ? model.balance.satsInt == 0 ? Qt.rgba(0.5,0.5,0.5,1) : Qt.rgba(0.75,0.75,0.75,1) : model.type == 'receive' diff --git a/electrum/gui/qml/components/Receive.qml b/electrum/gui/qml/components/Receive.qml index 24c11d6db..f53b865dd 100644 --- a/electrum/gui/qml/components/Receive.qml +++ b/electrum/gui/qml/components/Receive.qml @@ -143,7 +143,8 @@ Pane { width: parent.width Label { text: qsTr('Receive queue') - font.pixelSize: constants.fontSizeXLarge + font.pixelSize: constants.fontSizeLarge + color: Material.accentColor } } } diff --git a/electrum/gui/qml/components/Send.qml b/electrum/gui/qml/components/Send.qml index d4c6ca75f..1fbcdc458 100644 --- a/electrum/gui/qml/components/Send.qml +++ b/electrum/gui/qml/components/Send.qml @@ -176,7 +176,8 @@ Pane { width: parent.width Label { text: qsTr('Send queue') - font.pixelSize: constants.fontSizeXLarge + font.pixelSize: constants.fontSizeLarge + color: Material.accentColor } } } diff --git a/electrum/gui/qml/qeapp.py b/electrum/gui/qml/qeapp.py index 5d20a305f..36dfc99d6 100644 --- a/electrum/gui/qml/qeapp.py +++ b/electrum/gui/qml/qeapp.py @@ -154,10 +154,11 @@ class ElectrumQmlApplication(QGuiApplication): # add a monospace font as we can't rely on device having one self.fixedFont = 'PT Mono' - if (QFontDatabase.addApplicationFont('electrum/gui/qml/fonts/PTMono-Regular.ttf') < 0 and - QFontDatabase.addApplicationFont('electrum/gui/qml/fonts/PTMono-Bold.ttf') < 0): - self.logger.warning('Could not load font PT Mono') - self.fixedFont = 'Monospace' # hope for the best + not_loaded = QFontDatabase.addApplicationFont('electrum/gui/qml/fonts/PTMono-Regular.ttf') < 0 + not_loaded = QFontDatabase.addApplicationFont('electrum/gui/qml/fonts/PTMono-Bold.ttf') < 0 and not_loaded + if not_loaded: + self.logger.warning('Could not load font PT Mono') + self.fixedFont = 'Monospace' # hope for the best self.context = self.engine.rootContext() self._qeconfig = QEConfig(config)