Files
purple-electrumwallet/electrum/gui/qml/components/controls/ChannelDelegate.qml
T
2022-07-07 18:29:01 +02:00

81 lines
1.9 KiB
QML

import QtQuick 2.6
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.0
import QtQuick.Controls.Material 2.0
ItemDelegate {
id: root
height: item.height
width: ListView.view.width
font.pixelSize: constants.fontSizeSmall // set default font size for child controls
GridLayout {
id: item
anchors {
left: parent.left
right: parent.right
leftMargin: constants.paddingSmall
rightMargin: constants.paddingSmall
}
columns: 2
Rectangle {
Layout.columnSpan: 2
Layout.fillWidth: true
Layout.preferredHeight: constants.paddingTiny
color: 'transparent'
}
Image {
id: walleticon
source: "../../../icons/lightning.png"
fillMode: Image.PreserveAspectFit
Layout.rowSpan: 2
Layout.preferredWidth: constants.iconSizeLarge
Layout.preferredHeight: constants.iconSizeLarge
}
RowLayout {
Layout.fillWidth: true
Label {
Layout.fillWidth: true
text: model.node_alias
elide: Text.ElideRight
wrapMode: Text.Wrap
maximumLineCount: 2
}
Label {
text: model.state
}
}
RowLayout {
Layout.fillWidth: true
Label {
Layout.fillWidth: true
text: model.short_cid
}
Label {
text: Config.formatSats(model.capacity)
}
Label {
text: Config.baseUnit
}
}
Rectangle {
Layout.columnSpan: 2
Layout.fillWidth: true
Layout.preferredHeight: constants.paddingTiny
color: 'transparent'
}
}
}