Skip to content

Commit 5053ec2

Browse files
committed
Added download label
1 parent 6db40ec commit 5053ec2

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

mist/assets/qml/main.qml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,14 @@ ApplicationWindow {
303303
x: statusBar.width / 2 - this.width / 2
304304
width: 160
305305
}
306+
Label {
307+
objectName: "downloadLabel"
308+
y: 7
309+
anchors.left: downloadIndicator.right
310+
anchors.leftMargin: 5
311+
font.pixelSize: 10
312+
text: "0 / 0"
313+
}
306314

307315

308316
RowLayout {

mist/gui.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,12 +466,17 @@ func (gui *Gui) update() {
466466
var (
467467
pct float64 = 1.0 / float64(chainLength) * float64(blockLength)
468468
dlWidget = gui.win.Root().ObjectByName("downloadIndicator")
469+
dlLabel = gui.win.Root().ObjectByName("downloadLabel")
469470
)
470471
if pct < 1.0 {
471472
dlWidget.Set("visible", true)
472473
dlWidget.Set("value", pct)
474+
475+
dlLabel.Set("visible", true)
476+
dlLabel.Set("text", fmt.Sprintf("%d / %d", blockLength, chainLength))
473477
} else {
474478
dlWidget.Set("visible", false)
479+
dlLabel.Set("visible", false)
475480
}
476481

477482
case <-statsUpdateTicker.C:

0 commit comments

Comments
 (0)