4 changed files with 112 additions and 38 deletions
@ -0,0 +1,80 @@ |
|||||||
|
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' |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
|
} |
||||||
Loading…
Reference in new issue