add can send/can receive (totals and per-channel), fiat, channel ratio indicator
This commit is contained in:
@@ -33,7 +33,7 @@ ItemDelegate {
|
||||
id: walleticon
|
||||
source: "../../../icons/lightning.png"
|
||||
fillMode: Image.PreserveAspectFit
|
||||
Layout.rowSpan: 2
|
||||
Layout.rowSpan: 3
|
||||
Layout.preferredWidth: constants.iconSizeLarge
|
||||
Layout.preferredHeight: constants.iconSizeLarge
|
||||
}
|
||||
@@ -58,17 +58,57 @@ ItemDelegate {
|
||||
Label {
|
||||
Layout.fillWidth: true
|
||||
text: model.short_cid
|
||||
color: constants.mutedForeground
|
||||
}
|
||||
|
||||
Label {
|
||||
text: Config.formatSats(model.capacity)
|
||||
font.family: FixedFont
|
||||
}
|
||||
|
||||
Label {
|
||||
text: Config.baseUnit
|
||||
color: Material.accentColor
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
id: chviz
|
||||
Layout.fillWidth: true
|
||||
height: 10
|
||||
onWidthChanged: {
|
||||
var cap = model.capacity.satsInt * 1000
|
||||
var twocap = cap * 2
|
||||
b1.width = width * (cap - model.can_send.msatsInt) / twocap
|
||||
b2.width = width * model.can_send.msatsInt / twocap
|
||||
b3.width = width * model.can_receive.msatsInt / twocap
|
||||
b4.width = width * (cap - model.can_receive.msatsInt) / twocap
|
||||
}
|
||||
Rectangle {
|
||||
id: b1
|
||||
x: 0
|
||||
height: parent.height
|
||||
color: 'gray'
|
||||
}
|
||||
Rectangle {
|
||||
id: b2
|
||||
anchors.left: b1.right
|
||||
height: parent.height
|
||||
color: constants.colorLightningLocal
|
||||
}
|
||||
Rectangle {
|
||||
id: b3
|
||||
anchors.left: b2.right
|
||||
height: parent.height
|
||||
color: constants.colorLightningRemote
|
||||
}
|
||||
Rectangle {
|
||||
id: b4
|
||||
anchors.left: b3.right
|
||||
height: parent.height
|
||||
color: 'gray'
|
||||
}
|
||||
}
|
||||
Rectangle {
|
||||
Layout.columnSpan: 2
|
||||
Layout.fillWidth: true
|
||||
|
||||
Reference in New Issue
Block a user