diff --git a/electrum/gui/qml/components/Addresses.qml b/electrum/gui/qml/components/Addresses.qml index 447e4d12e..8b8b2308b 100644 --- a/electrum/gui/qml/components/Addresses.qml +++ b/electrum/gui/qml/components/Addresses.qml @@ -76,14 +76,14 @@ Pane { Layout.preferredWidth: constants.iconSizeMedium Layout.preferredHeight: constants.iconSizeMedium color: model.held - ? Qt.rgba(1,0,0,0.75) + ? constants.colorAddressFrozen : model.numtx > 0 ? model.balance.satsInt == 0 - ? Qt.rgba(0.5,0.5,0.5,1) - : Qt.rgba(0.75,0.75,0.75,1) + ? constants.colorAddressUsed + : constants.colorAddressUsedWithBalance : model.type == 'receive' - ? Qt.rgba(0,1,0,0.5) - : Qt.rgba(1,0.93,0,0.75) + ? constants.colorAddressExternal + : constants.colorAddressInternal } RowLayout { diff --git a/electrum/gui/qml/components/Constants.qml b/electrum/gui/qml/components/Constants.qml index 7715de68e..a28310aaa 100644 --- a/electrum/gui/qml/components/Constants.qml +++ b/electrum/gui/qml/components/Constants.qml @@ -43,6 +43,12 @@ Item { property color colorPiechartParticipant: 'gray' property color colorPiechartSignature: 'yellow' + property color colorAddressExternal: Qt.rgba(0,1,0,0.5) + property color colorAddressInternal: Qt.rgba(1,0.93,0,0.75) + property color colorAddressUsed: Qt.rgba(0.5,0.5,0.5,1) + property color colorAddressUsedWithBalance: Qt.rgba(0.75,0.75,0.75,1) + property color colorAddressFrozen: Qt.rgba(0.5,0.5,1,0.75) + function colorAlpha(baseColor, alpha) { return Qt.rgba(baseColor.r, baseColor.g, baseColor.b, alpha) }