qml: use color for accounting addresses
This commit is contained in:
@@ -70,6 +70,7 @@ Item {
|
|||||||
property color colorAddressFrozen: Qt.rgba(0.5,0.5,1,1)
|
property color colorAddressFrozen: Qt.rgba(0.5,0.5,1,1)
|
||||||
property color colorAddressBilling: "#8cb3f2"
|
property color colorAddressBilling: "#8cb3f2"
|
||||||
property color colorAddressSwap: colorAddressBilling
|
property color colorAddressSwap: colorAddressBilling
|
||||||
|
property color colorAddressAccounting: "#ff9b45"
|
||||||
|
|
||||||
function colorAlpha(baseColor, alpha) {
|
function colorAlpha(baseColor, alpha) {
|
||||||
return Qt.rgba(baseColor.r, baseColor.g, baseColor.b, alpha)
|
return Qt.rgba(baseColor.r, baseColor.g, baseColor.b, alpha)
|
||||||
|
|||||||
@@ -15,7 +15,9 @@ TextHighlightPane {
|
|||||||
? qsTr('mine')
|
? qsTr('mine')
|
||||||
: model.is_swap
|
: model.is_swap
|
||||||
? qsTr('swap')
|
? qsTr('swap')
|
||||||
: ""
|
: model.is_accounting
|
||||||
|
? qsTr('accounting')
|
||||||
|
: ""
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
@@ -74,7 +76,9 @@ TextHighlightPane {
|
|||||||
: constants.colorAddressExternal
|
: constants.colorAddressExternal
|
||||||
: model.is_swap
|
: model.is_swap
|
||||||
? constants.colorAddressSwap
|
? constants.colorAddressSwap
|
||||||
: Material.foreground
|
: model.is_accounting
|
||||||
|
? constants.colorAddressAccounting
|
||||||
|
: Material.foreground
|
||||||
wrapMode: Text.WrapAnywhere
|
wrapMode: Text.WrapAnywhere
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,10 +13,12 @@ TextHighlightPane {
|
|||||||
property bool allowClickAddress: true
|
property bool allowClickAddress: true
|
||||||
property int idx: -1
|
property int idx: -1
|
||||||
|
|
||||||
property string _suffix: model.is_mine || model.is_change
|
property string _suffix: model.is_mine || model.is_change || model.is_accounting
|
||||||
? model.is_reserve
|
? model.is_reserve
|
||||||
? qsTr('reserve')
|
? qsTr('reserve')
|
||||||
: qsTr('mine')
|
: model.is_accounting
|
||||||
|
? qsTr('accounting')
|
||||||
|
: qsTr('mine')
|
||||||
: model.is_swap
|
: model.is_swap
|
||||||
? qsTr('swap')
|
? qsTr('swap')
|
||||||
: model.is_billing
|
: model.is_billing
|
||||||
@@ -83,7 +85,9 @@ TextHighlightPane {
|
|||||||
? constants.colorAddressBilling
|
? constants.colorAddressBilling
|
||||||
: model.is_swap
|
: model.is_swap
|
||||||
? constants.colorAddressSwap
|
? constants.colorAddressSwap
|
||||||
: Material.foreground
|
: model.is_accounting
|
||||||
|
? constants.colorAddressAccounting
|
||||||
|
: Material.foreground
|
||||||
TapHandler {
|
TapHandler {
|
||||||
enabled: allowClickAddress && model.is_mine
|
enabled: allowClickAddress && model.is_mine
|
||||||
onTapped: {
|
onTapped: {
|
||||||
|
|||||||
@@ -308,7 +308,8 @@ class QETxDetails(QObject, QtEventListener):
|
|||||||
'address': x.address,
|
'address': x.address,
|
||||||
'is_mine': self._wallet.wallet.is_mine(x.address),
|
'is_mine': self._wallet.wallet.is_mine(x.address),
|
||||||
'is_change': self._wallet.wallet.is_change(x.address),
|
'is_change': self._wallet.wallet.is_change(x.address),
|
||||||
'is_swap': False if not sm else sm.is_lockup_address_for_a_swap(x.address) or x.address == DummyAddress.SWAP
|
'is_swap': False if not sm else sm.is_lockup_address_for_a_swap(x.address) or x.address == DummyAddress.SWAP,
|
||||||
|
'is_accounting': self._wallet.wallet.is_accounting_address(x.address)
|
||||||
}, self._tx.inputs()))
|
}, self._tx.inputs()))
|
||||||
self._outputs = list(map(lambda x: {
|
self._outputs = list(map(lambda x: {
|
||||||
'address': x.get_ui_address_str(),
|
'address': x.get_ui_address_str(),
|
||||||
@@ -317,7 +318,8 @@ class QETxDetails(QObject, QtEventListener):
|
|||||||
'is_mine': self._wallet.wallet.is_mine(x.get_ui_address_str()),
|
'is_mine': self._wallet.wallet.is_mine(x.get_ui_address_str()),
|
||||||
'is_change': self._wallet.wallet.is_change(x.get_ui_address_str()),
|
'is_change': self._wallet.wallet.is_change(x.get_ui_address_str()),
|
||||||
'is_billing': self._wallet.wallet.is_billing_address(x.get_ui_address_str()),
|
'is_billing': self._wallet.wallet.is_billing_address(x.get_ui_address_str()),
|
||||||
'is_swap': False if not sm else sm.is_lockup_address_for_a_swap(x.get_ui_address_str()) or x.get_ui_address_str() == DummyAddress.SWAP
|
'is_swap': False if not sm else sm.is_lockup_address_for_a_swap(x.get_ui_address_str()) or x.get_ui_address_str() == DummyAddress.SWAP,
|
||||||
|
'is_accounting': self._wallet.wallet.is_accounting_address(x.get_ui_address_str())
|
||||||
}, self._tx.outputs()))
|
}, self._tx.outputs()))
|
||||||
|
|
||||||
txinfo = self._wallet.wallet.get_tx_info(self._tx)
|
txinfo = self._wallet.wallet.get_tx_info(self._tx)
|
||||||
|
|||||||
@@ -289,6 +289,7 @@ class TxFeeSlider(FeeSlider):
|
|||||||
'is_change': self._wallet.wallet.is_change(o.get_ui_address_str()),
|
'is_change': self._wallet.wallet.is_change(o.get_ui_address_str()),
|
||||||
'is_billing': self._wallet.wallet.is_billing_address(o.get_ui_address_str()),
|
'is_billing': self._wallet.wallet.is_billing_address(o.get_ui_address_str()),
|
||||||
'is_swap': False if not sm else sm.is_lockup_address_for_a_swap(o.get_ui_address_str()) or o.get_ui_address_str() == DummyAddress.SWAP,
|
'is_swap': False if not sm else sm.is_lockup_address_for_a_swap(o.get_ui_address_str()) or o.get_ui_address_str() == DummyAddress.SWAP,
|
||||||
|
'is_accounting': self._wallet.wallet.is_accounting_address(o.get_ui_address_str()),
|
||||||
'is_reserve': o.is_utxo_reserve
|
'is_reserve': o.is_utxo_reserve
|
||||||
})
|
})
|
||||||
self.outputs = outputs
|
self.outputs = outputs
|
||||||
|
|||||||
Reference in New Issue
Block a user