qml: take internal, external, billing address colors from desktop client and color output addresses
accordingly in ConfirmTxDialog, TxDetails, CpfpBumpFeeDialog, RbfBumpFeeDialog and RbfCancelDialog
This commit is contained in:
@@ -194,7 +194,13 @@ ElDialog {
|
||||
wrapMode: Text.Wrap
|
||||
font.pixelSize: constants.fontSizeLarge
|
||||
font.family: FixedFont
|
||||
color: modelData.is_mine ? constants.colorMine : Material.foreground
|
||||
color: modelData.is_mine
|
||||
? modelData.is_change
|
||||
? constants.colorAddressInternal
|
||||
: constants.colorAddressExternal
|
||||
: modelData.is_billing
|
||||
? constants.colorAddressBilling
|
||||
: Material.foreground
|
||||
}
|
||||
Label {
|
||||
text: Config.formatSats(modelData.value_sats)
|
||||
|
||||
@@ -41,7 +41,6 @@ Item {
|
||||
property color colorProgress: '#ffffff80'
|
||||
property color colorDone: '#ff80ff80'
|
||||
|
||||
property color colorMine: "yellow"
|
||||
property color colorLightningLocal: "blue"
|
||||
property color colorLightningRemote: "yellow"
|
||||
property color colorChannelOpen: "#ff80ff80"
|
||||
@@ -57,11 +56,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 colorAddressExternal: "#8af296" //Qt.rgba(0,1,0,0.5)
|
||||
property color colorAddressInternal: "#ffff00" //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,1)
|
||||
property color colorAddressBilling: "#8cb3f2"
|
||||
|
||||
function colorAlpha(baseColor, alpha) {
|
||||
return Qt.rgba(baseColor.r, baseColor.g, baseColor.b, alpha)
|
||||
|
||||
@@ -197,7 +197,13 @@ ElDialog {
|
||||
wrapMode: Text.Wrap
|
||||
font.pixelSize: constants.fontSizeLarge
|
||||
font.family: FixedFont
|
||||
color: modelData.is_mine ? constants.colorMine : Material.foreground
|
||||
color: modelData.is_mine
|
||||
? modelData.is_change
|
||||
? constants.colorAddressInternal
|
||||
: constants.colorAddressExternal
|
||||
: modelData.is_billing
|
||||
? constants.colorAddressBilling
|
||||
: Material.foreground
|
||||
}
|
||||
Label {
|
||||
text: Config.formatSats(modelData.value_sats)
|
||||
|
||||
@@ -210,7 +210,13 @@ ElDialog {
|
||||
wrapMode: Text.Wrap
|
||||
font.pixelSize: constants.fontSizeLarge
|
||||
font.family: FixedFont
|
||||
color: modelData.is_mine ? constants.colorMine : Material.foreground
|
||||
color: modelData.is_mine
|
||||
? modelData.is_change
|
||||
? constants.colorAddressInternal
|
||||
: constants.colorAddressExternal
|
||||
: modelData.is_billing
|
||||
? constants.colorAddressBilling
|
||||
: Material.foreground
|
||||
}
|
||||
Label {
|
||||
text: Config.formatSats(modelData.value_sats)
|
||||
|
||||
@@ -169,7 +169,13 @@ ElDialog {
|
||||
wrapMode: Text.Wrap
|
||||
font.pixelSize: constants.fontSizeLarge
|
||||
font.family: FixedFont
|
||||
color: modelData.is_mine ? constants.colorMine : Material.foreground
|
||||
color: modelData.is_mine
|
||||
? modelData.is_change
|
||||
? constants.colorAddressInternal
|
||||
: constants.colorAddressExternal
|
||||
: modelData.is_billing
|
||||
? constants.colorAddressBilling
|
||||
: Material.foreground
|
||||
}
|
||||
Label {
|
||||
text: Config.formatSats(modelData.value_sats)
|
||||
|
||||
@@ -279,7 +279,13 @@ Pane {
|
||||
wrapMode: Text.Wrap
|
||||
font.pixelSize: constants.fontSizeLarge
|
||||
font.family: FixedFont
|
||||
color: modelData.is_mine ? constants.colorMine : Material.foreground
|
||||
color: modelData.is_mine
|
||||
? modelData.is_change
|
||||
? constants.colorAddressInternal
|
||||
: constants.colorAddressExternal
|
||||
: modelData.is_billing
|
||||
? constants.colorAddressBilling
|
||||
: Material.foreground
|
||||
}
|
||||
Label {
|
||||
text: Config.formatSats(modelData.value)
|
||||
|
||||
@@ -247,8 +247,10 @@ class QETxDetails(QObject, QtEventListener):
|
||||
self._outputs = list(map(lambda x: {
|
||||
'address': x.get_ui_address_str(),
|
||||
'value': QEAmount(amount_sat=x.value),
|
||||
'is_mine': self._wallet.wallet.is_mine(x.get_ui_address_str())
|
||||
}, self._tx.outputs()))
|
||||
'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_billing': self._wallet.wallet.is_billing_address(x.get_ui_address_str())
|
||||
}, self._tx.outputs()))
|
||||
|
||||
txinfo = self._wallet.wallet.get_tx_info(self._tx)
|
||||
|
||||
|
||||
@@ -214,7 +214,9 @@ class TxFeeSlider(FeeSlider):
|
||||
outputs.append({
|
||||
'address': o.get_ui_address_str(),
|
||||
'value_sats': o.value,
|
||||
'is_mine': self._wallet.wallet.is_mine(o.get_ui_address_str())
|
||||
'is_mine': self._wallet.wallet.is_mine(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())
|
||||
})
|
||||
self.outputs = outputs
|
||||
|
||||
|
||||
Reference in New Issue
Block a user