File tree Expand file tree Collapse file tree 4 files changed +70
-15
lines changed Expand file tree Collapse file tree 4 files changed +70
-15
lines changed Original file line number Diff line number Diff line change @@ -304,6 +304,7 @@ QML_QRC_CPP = qml/qrc_bitcoin.cpp
304
304
QML_QRC = qml/bitcoin_qml.qrc
305
305
QML_RES_QML = \
306
306
qml/components/BlockCounter.qml \
307
+ qml/components/BlocksListView.qml \
307
308
qml/components/ConnectionOptions.qml \
308
309
qml/controls/OptionButton.qml \
309
310
qml/pages/initerrormessage.qml \
Original file line number Diff line number Diff line change 1
1
<!DOCTYPE RCC><RCC version="1.0">
2
2
<qresource prefix="/qml">
3
3
<file>controls/OptionButton.qml</file>
4
+ <file>components/BlocksListView.qml</file>
4
5
<file>components/BlockCounter.qml</file>
5
6
<file>components/ConnectionOptions.qml</file>
6
7
<file>pages/initerrormessage.qml</file>
Original file line number Diff line number Diff line change
1
+ // Copyright (c) 2021 The Bitcoin Core developers
2
+ // Distributed under the MIT software license, see the accompanying
3
+ // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
+
5
+ import BitcoinCore 1.0
6
+ import QtQuick 2.12
7
+ import QtQuick.Controls 2.12
8
+ import QtQuick.Layouts 1.11
9
+ import "../controls"
10
+
11
+ ListView {
12
+ spacing: 15
13
+ model: ChainModel {
14
+ }
15
+ delegate: ItemDelegate {
16
+ id: delegate
17
+ padding: 15
18
+ background: Rectangle {
19
+ border .width : 1
20
+ border .color : delegate .hovered ? " white" : " #999999"
21
+ radius: 10
22
+ color: " transparent"
23
+ }
24
+ contentItem: ColumnLayout {
25
+ spacing: 3
26
+ Label {
27
+ color: " white"
28
+ font .family : " Inter"
29
+ font .styleName : " Regular"
30
+ font .pixelSize : 28
31
+ text: qsTrId (' Block #%1' ).arg (blockHeight)
32
+ }
33
+ Label {
34
+ Layout .fillWidth : true
35
+ Layout .preferredWidth : 0
36
+ color: " white"
37
+ elide: Text .ElideRight
38
+ font .family : " Inter"
39
+ font .styleName : " Regular"
40
+ font .pixelSize : 13
41
+ text: blockHash
42
+ }
43
+ }
44
+ }
45
+ }
Original file line number Diff line number Diff line change @@ -22,23 +22,31 @@ ApplicationWindow {
22
22
id: loader
23
23
active: initExecutor .ready
24
24
anchors .centerIn : parent
25
- sourceComponent: ColumnLayout {
25
+ sourceComponent: RowLayout {
26
26
spacing: 15
27
- width: 400
28
- NodeModel {
29
- id: node_model
27
+ ColumnLayout {
28
+ spacing: 15
29
+ Layout .preferredWidth : 400
30
+ NodeModel {
31
+ id: nodeModel
32
+ }
33
+ Image {
34
+ Layout .alignment : Qt .AlignCenter
35
+ source: " image://images/app"
36
+ sourceSize .width : 64
37
+ sourceSize .height : 64
38
+ }
39
+ BlockCounter {
40
+ Layout .alignment : Qt .AlignCenter
41
+ blockHeight: nodeModel .blockTipHeight
42
+ }
43
+ ConnectionOptions {
44
+ }
30
45
}
31
- Image {
32
- Layout .alignment : Qt .AlignCenter
33
- source: " image://images/app"
34
- sourceSize .width : 64
35
- sourceSize .height : 64
36
- }
37
- BlockCounter {
38
- Layout .alignment : Qt .AlignCenter
39
- blockHeight: nodeModel .blockTipHeight
40
- }
41
- ConnectionOptions {
46
+ BlocksListView {
47
+ Layout .fillHeight : true
48
+ Layout .preferredHeight : 0
49
+ Layout .preferredWidth : 300
42
50
}
43
51
}
44
52
}
You can’t perform that action at this time.
0 commit comments